Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9159531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:30:56+00:00 2026-06-17T13:30:56+00:00

Does regex_search becomes equivalent to regex_match while matching something in a string if my

  • 0

Does regex_search becomes equivalent to regex_match while matching something in a string if my regex pattern has the following form: ^.......$, i.e. if I tell that what is matched should be in start of the string and should end with the end of the string? Or is there any other difference?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:30:57+00:00Added an answer on June 17, 2026 at 1:30 pm

    No, they aren’t equivalent, because the $ in regex_search will match the line-end and ^ will match line-start.
    So in a multi-line string the regex_search would still find sub-matches.
    I guess adding the flags boost::match_not_eol and boost::match_not_bol would create the regex_match behaviour.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wondering why the following regex does not match. string query = \1
What does the underscore mean in the following regex? [a-zA-Z0-9_] The _ seems to
A regex answers a yes or no question - does the string match the
what is a regex to find any text that has 'abc' but does not
The following regex finds text between substrings FTW and ODP. /FTW(((?!FTW|ODP).)+)ODP+/ What does the
I am trying to search a string for email addresses, but my regex does
I wonder how does regex work, my particular regex has an element that looks
Using regex, how do I search for a string that does not include cetrain
Does this regex mean it has to start with A, end with Z? re.search(\A[0-9A-Za-z_-]+\Z,
In Python compiled regex patterns have a findall method that does the following: Return

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.