
static const std::string& REGEX1 =
"\\s*(\\w+){1}\\s+([\\d,\\.]+){1}\\s+([\\d,\\.]+){1}\\s+([\\d,\\.]+)\\s*$";
2010/6/23 John Maddock
Ugh? REGEX1 will match a string containing *one* word (the "(\\w+)" part), followed by three numbers which may also contain any number of "."'s or ","'s. And that's exactly what it's doing isn't it?
Maybe I've missed something? John.
Hi John, my idea was to match numbers with US and Brazilian decimal and grouping chars. So it should match 2,000,000.00 and 2.000.000,00. Again, I am a beginner with regex so if you have a suggestion to do that in a more efficient or simpler way please feel free to do so. Obs.: in the previous message I posted the code fixed by Steven suggestion. Thank you for your attention, Mau. -- Mau