boost::regex - how to do a search_rev() ?
Hi all, String classes usually have a search_rev() function to start search from the rightmost end. Is it possible to do such a search using boost::regex? I need to find out if a text buffer (usually of size in hundreds of MBs) has certain sequences in the end. Thanks. -- Fab Ximi
fxplus wrote:
Hi all,
String classes usually have a search_rev() function to start search from the rightmost end. Is it possible to do such a search using boost::regex?
No there's no direct support for that in Boost.Regex: the semantics of how a reverse search should behave for a regular expression are far from clearly defined.
I need to find out if a text buffer (usually of size in hundreds of MBs) has certain sequences in the end.
Can you express the pattern in reverse and then search forwards in reverse-iterators? I hope that makes sense... John.
participants (2)
-
fxplus
-
John Maddock