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
2 answers

Infinite loop when using regex_search with std::string

Why does the following code result in an infinite loop? #include #include #include int main() { const std::string formula = "LAST_BID_EURUSD$ LAST_ASK_USDJPY$"; boost::smatch matches; boost::regex…
FrozenHeart
  • 19,844
  • 33
  • 126
  • 242
0
votes
1 answer

Regex Lookahead character restrictions?

I am trying to learn some things about Regex. I am starting off by trying to hide some matches for a nine digit number, such as a SSN, but let through all nine digit numbers that have the word "order" or "routing number" but it seems that only…
Alan
  • 53
  • 8
0
votes
1 answer

Build boost asio 1.58 for windows phone 8.1 & windows 8.1

I had try to build Boost Asio 1.58 for Windows Phone 8.1 & Windows 8.1 with that command b2 b2 toolset=msvc=12.0 windows-api=store architecture=arm but it's fail on build "libboost_regex-vc120-mt-1_58.lib", so i must need…
0
votes
1 answer

How do I insert format str and don't remove the matched regular expression in input string in boost::regex_replace() in C++?

I want to put space between punctuations and other words in a sentence. But boost::regex_replace() replaces the punctuation with space, and I want to keep a punctuation in the sentence! for example in this code the output should be "Hello . hi , "…
Yadollah
  • 77
  • 8
0
votes
1 answer

Translate accented to unaccented characters in Sublime Text snippet using regex

I'm writing a ST3 snippet that inserts a \subsection{} with a label. The label is created by converting the header text to conform with the LaTeX standards for labels using a (rather lengthy) regular expression: ${1/(?:([…
Fredrik P
  • 682
  • 1
  • 8
  • 21
0
votes
1 answer

boost and Curl not work together

I really can not understand what my problem Here is my code: #include #include #include using namespace std; using namespace boost; int Write_callback(char *data, size_t size, size_t nmemb, string…
kirill reut
  • 33
  • 1
  • 1
  • 5
0
votes
2 answers

Regular expression quantifier questions

Im trying to find a regular expression that matches this kind of URL: http://sub.domain.com/selector/F/13/K/100546/sampletext/654654/K/sampletext_sampletext.html and dont match…
Sosi
  • 2,578
  • 8
  • 39
  • 49
0
votes
2 answers

Regex to get value that comes after certain word

I have a string that will always be dynamic, each time it returns one of the values below: Return 1 -> Após o vencimento cobrar juros mora/dia de: R$ 3.44 ao dia Multa de: R$ 17,21 Valores expressos em Real (R$\f REMESSA CIP 263 Return 2 -> Após o…
user2297392
0
votes
0 answers

How to use boost regex create with CString

I try to do: boost::tregex prot_mask(_T("[0-9][0-9]?")); But it failed: Error:expected a type specifier. It's something to do with _T. What did I do wrong?
0
votes
0 answers

static members get 'is not a static member of class'

Problem I want to assign values in a class definition which is in a separate header file from the class declaration cpp. On compilation I recieve theses error messages: error: ‘const std::map > bob::mRegexes’ is…
0
votes
1 answer

Regular expression for a number with fractional and decimal part

I am new to regular expression , i want a regular expression which satisfies following reqs: User can enter a value in which the fractional part should not be more than 3 digits ,it can be less than 3 digits and the decimal part should not more than…
Sadaab
  • 83
  • 1
  • 1
  • 7
0
votes
2 answers

Unable to execute dex: Multiple dex files define Ledu/stanford/nlp/graph/ConnectedComponents

i am new to android and i want an application that checks the matching of sentence against a sentence. for that i m using stanford tregex tool and i have included the 4 jar files form the package into the libs of my project. while running i got an…
CATIEEE
  • 45
  • 1
  • 9
0
votes
1 answer

Regex - converting to CamelCase and cutting founded word

Problem 1 Lets say I have this word realPersonId and want to find in text and replace it with word without Id suffix. First letter needs to be capital. I can't get that capital. Sample text: realPersonId Find expression: (\s+)(.*)Id Replace…
shx
  • 1,068
  • 1
  • 14
  • 30
0
votes
0 answers

WhiteSpace with Boost::regex

I need to search a string with whitespace using Boost:regex search, but it never matches. I need to get the username from the work mail (second match in the input below), but the order can change, so I need to scan the whole string. Input: homemail:…
0
votes
1 answer

How can I regex select the Nth occurence between two points

Using regular expressions, is there a concise, elegant and short way to select the last word occuring just before the second semicolon in this list, and also include non-English characters and hyphens? I've been putting it through regexr.com, but…
Lasse
  • 77
  • 1
  • 10