Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Does boost::regex_search support branch sentence like (....)|(....)?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Erik Wikström, post: 3541119"] I think you intended to find a string consisting of either one or more numbers or one or more lower-case letters. While I'm not familiar with the Boost::regex dialect the above probably means one or more numbers followed by a "|" followed by an "a", a "-", and a "z". You probably want something like this: ((\\d+)|([a-z]+)) Notice that this introduces a new capturing group, there should be a way to make the added pair of parenthesis non-capturing, probably something like: (?:(\\d+)|([a-z]+)) [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Does boost::regex_search support branch sentence like (....)|(....)?
Top