
Hi, compiling "a{7}" or any repeat with curly brackets gives me an "invalid regex synyax"! Any clues or workarounds? Then boost::regex expression("GO:(\d+)",regex::bk_refs); string str=boost::regex_replace("GO:000015|GO:00016",expression,"$1") str equals "00001500015|00016" instead of the expected "000015|00016"!? I constructed a workaround for the latter problem with an explicit loop over regex_iterator and such but this not really handy... Thanx for any feedback!! Kenny _________________________________________________________________ Plannen om een nieuwe computer te kopen? Kijk eens hier.. http://www.msn.be/shopping/dell_bis/

compiling "a{7}" or any repeat with curly brackets gives me an "invalid regex synyax"! Any clues or workarounds?
Then boost::regex expression("GO:(\d+)",regex::bk_refs); string str=boost::regex_replace("GO:000015|GO:00016",expression,"$1") str equals "00001500015|00016" instead of the expected "000015|00016"!? I constructed a workaround for the latter problem with an explicit loop over regex_iterator and such but this not really handy...
Thanx for any feedback!!
You need to tell regex what kind of expression it is, it defaults to something like POSIX basic syntax (which doesn't support {}) unless you add in the necessary flags, so I guess what you really meant was either: boost::regex expression("GO:(\d+)",regex::perl); or boost::regex expression("GO:(\d+)",regex::extended|regex::bk_refs); John.
participants (2)
-
John Maddock
-
Pietje Leugenaar