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

regular expressions boost c++

trying to catch the characters at the start the string and newlines the string is .V/1LBOG\n.F/AV0094/08NOV/SAL/Y\n.E/0134249356001" the regular expression i am using is from the string above i need to catch .V/ and .E/ ^.[VE]/* But it only seems…
CodersSC
  • 710
  • 2
  • 13
  • 29
0
votes
1 answer

regular expressions matches characters on different lines at the start

My question is how to match the first three characters of certain lines within a string using regular expressions the regex i have should work however when i run the program it only matches the first three characters of the first line the string is…
CodersSC
  • 710
  • 2
  • 13
  • 29
0
votes
3 answers

C++ Simple use of regex

I'm just trying to mess around and get familiar with using regex in c++. Let's say I want the user to input the following: ###-$$-###, make #=any number between 0-9 and $=any number between 0-5. This is my idea for accomplishing this: regex…
Richard
  • 5,840
  • 36
  • 123
  • 208
0
votes
2 answers

Parse rules CF-grammar using Regular Expressions (how using templates)

I have CF-grammar. It rules is as follows: S->a|AS A->AB|a|b B->b I want to parse these rules using Regular Expressions. My Regular Expression: \b([A-Z])->(?:([A-Za-z]+)\|?)+ For: "A->AB|a|b" result: 0: A->AB|a|b 1: A 2: b but I whant…
couatl
  • 416
  • 4
  • 14
0
votes
0 answers

Using custom allocator for boost::wregex

I created a custom allocator and want to use it all across our code. The way we did it is by defining the templates that wrap each containers we use and make use of our own allocator instead of the default: template class myVector :…
OSH
  • 2,847
  • 3
  • 25
  • 46
0
votes
3 answers

Tokenize a string excluding delimiters inside quotes

First let me say, I have gone thoroughly through all other solutions to this problem on SO, and although they are very similar, none fully solve my problem. I need a to extract all tokens excluding quotes (for the quoted ones) using boost regex. The…
Spencer Rose
  • 1,190
  • 12
  • 21
0
votes
1 answer

Notepad++ regex for text surrounded by double newline

I am trying to find all text blocks in a file, that contain a string, matching the following regex: D[:\/\\]+Apps[\/\\]+ and are surrounded by double newlines. For example in this…
0
votes
0 answers

boost regex symbol reference error on g++ 8.3

I'm trying to use boost::regex_search in my application. Compiling with g++ 8.3 version gives me a symbol referencing error as below boost::re_detail_106600::perl_matcher<__gnu_cxx::__normal_iterator
0
votes
0 answers

What is the minimal number of submodules to compile boost::regex with cmake + ExternalProject?

I need to compile boost from sources, it is a requirement. But I only need one library regex for a benchmark. I have success if I clone the entire boost project with the snippet below. However downloading the entire boost every time is very…
Something Something
  • 3,999
  • 1
  • 6
  • 21
0
votes
0 answers

The way to include static library (boost_regex.a) for release

In my case, want to include the static library for releasing binary to other machine, but it doesn't make it. The library is from boost_regex(1.80), and I tried to compile following steps. Change directory to {boost-path}/libs/regex/src/, and make…
0
votes
1 answer

Exception when escaping "\" in Boost Regex

I'm always getting an exception when trying to escape a backslash like this: boost::regex shaderRegex{ "test\\" }; Am I doing something wrong? Unhandled exception at 0x00007FFD13034FD9 in project.exe: Microsoft C++ exception:…
user13310405
0
votes
1 answer

LNK1104 cannot open file 'libboost_regex-vc90-mt-gd-1_37.lib'

Hi my team developed some years ago an application which consists of c# windows forms and c++. All developers gone away and nobody knows how to compile the source code. Now it is my job trying to compile it to be able to develop it further. As I am…
0
votes
1 answer

Does split_regex support group?

Can I setting split_regex working based on groups instead of using lookbehind? The code I'm using is as follows: string data = "xyz: 111.222: k.44.4: 12345"; vector data_vec; boost::algorithm::split_regex( data_vec, data,…
Yen Dang
  • 268
  • 2
  • 9
0
votes
1 answer

Difficulty using boost::regex_match to get separate matches for "NASIONAL" and "12" from string "NASIONAL12"

This works fine in all online regex testers but fails to produce any matches in boost::regex_match, which I unfortunately must use as is because it is being used in a system that expects this format for more complicated parsings of street…
StainlessSteelRat
  • 364
  • 1
  • 2
  • 16
0
votes
1 answer

Boost RegEx: Specific Question

I am trying to use this expression: Expression: "\w{1,}\s*?\-\-(\>)?\s*?\w{1,}" Keep in mind I am escaping the \ with a second \ in my code. When searching in the strings below. I think I am close, but no cigar. I want the expression above to be…
Matthew Hoggan
  • 7,402
  • 16
  • 75
  • 140