Questions tagged [boost-regex]

Boost.Regex is a C++ regular expression library with optional Unicode support through ICU.

Boost.Regex is a C++ regular expression library with optional Unicode support through ICU.

296 questions
0
votes
3 answers

Variable number of matches / back references in Regex?

I spent some time recently converting some SCSS code to Stylus, and one of my regex steps was to strip out the $ character in variable names, while formatting those names to camelCase rather than hyphenated-case. For example,…
lunelson
  • 561
  • 6
  • 11
0
votes
1 answer

Boost::Regex in Qt Creator

I'm a bit new to libraries and using anything other than Visual Studios to write C++. I was hoping to get help with installing Boost 1_49_0 for use with Qt Creator 4.8.1 on my Windows 7 computer. Edit: I need specific instructions on how libraries…
trippedoutfish
  • 357
  • 1
  • 4
  • 8
0
votes
1 answer

boost::regex performance issue

I am using boost::regex to find a delimiter in a string (in c++) and replace it with a different one if exist: const boost::regex esc(delimiter); const std::string rep = "\\\\" + delimiter; dest += boost::regex_replace(str, esc, rep, …
Shay
  • 633
  • 2
  • 11
  • 27
0
votes
1 answer

Regular Expression with VS2010 C++ / Boost

I am trying to take a string in C++ and find the project name and path contained inside. The string has the format: Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenGL01", "OpenGL01\OpenGL01.vcxproj",…
Joan Carles
  • 303
  • 5
  • 16
0
votes
1 answer

C++ multiple string grabber(regex)

I have problem with boost::regex, this solution works only for one result in each match boost::regex regex("id=\"(.*?)\""); // should I use this "id=\"(.*?)\"(.*?)(.*?)"? boost::sregex_token_iterator iter(xml.begin(), xml.end(),…
user1112008
  • 432
  • 10
  • 27
-1
votes
1 answer

How does Regex work in Boost Regex C++

I am currently using Boost Regex library and am trying to get a function called arguments in C++. For instance, I have a page with HTML and there a JavaScript function called, we will call it something like XsrfToken.setToken('54sffds'); What I…
Kurieita
  • 83
  • 12
-1
votes
1 answer

boost::regex_search and replace valgrind errors

I am having a lot of error valgrind when I'm trying to search and replace some data in a string using boost::regex. I'm getting the correct output but I'm a bit scared of this errors The thing funny it's that when I comment the line with the…
Alexis
  • 2,149
  • 2
  • 25
  • 39
-1
votes
4 answers

Nesting OR in Regular Expressions

How do I match an expression where I need to do an or of another set? i.e., how do I match something of the format [ [ [ a | b ] | [ x | y ] ] ] where a, b, x and y are strings. I want to match the phrases like a b x y a x a y b x b…
-2
votes
1 answer

Is boost regex slower than this combination of isupper and isdigit?

I need to check whether a string consists of a special set of characters only (ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<). I could either use boost regex or a combination of isupper and isdigit. Which one would be considered the better choice when it…
tzippy
  • 6,458
  • 30
  • 82
  • 151
-2
votes
1 answer

Regular expression 'is invalid'

I'm trying to select with regular expression any file with db extension. My regex is: *.db yet I'm getting error saying that '*' cannot start regular expression? How so, every time I type something like *.exe let's say in windows explorer…
There is nothing we can do
  • 23,727
  • 30
  • 106
  • 194
-4
votes
2 answers

Regex * not working

I have the string "abc.aspx?sdfsdfds;eter;yid=10". I want my regex to match the 10 part of that string. I wrote the regex (abc.aspx?*[?;]yid=), but it is not matching my string. The regex abc.aspx?yid=10;sdfsdf matches my string, and I used this…
1 2 3
19
20