Pogledajte određenu poruku
Staro 17. 02. 2012.   #22
morando
nedovoljno naspavan
Na probnom radu
 
Datum učlanjenja: 25.03.2011
Poruke: 21
Hvala: 7
1 "Hvala" u 1 poruci
morando is on a distinguished road
Default

Koliko sam razumeo, po defaultu C++ standard regex (iplementacija uzeta od Boost-a) koristi ECMAScript "gramatiku", to je valjda nesto slicno Perl-u?

Citat:
C++ TR1 regular expression flavor

The C++ TR1 regular expressions can follow the syntax of several regular expression environments depending on the optional flags sent to the regular expression class constructor. The six options given in the Microsoft implementation are as follows.

basic
extended
ECMAScript
awk
grep
egrep

The default for the Microsoft implementation is ECMAScript, matching the regular expression syntax of the ECMAScript (JavaScript) language, which is very similar to that in Perl 5.

The choice of flavors is extensible and implementation-specific. For example, the Boost implementation adds perl as an option, which presumably follows Perl 5 syntax more closely than the ECMASCript option does.

For someone familiar with regular expressions the difficulty in using regular expressions in C++ TR1 is not in the syntax of regular expressions themselves, but rather in using regular expressions to do work.
Izvor http://www.johndcook.com/cpp_regex.html

E sad ovi "flagovi" mogu da se menjaju ako postavim neki drugi kao paramatar u konstruktoru regex-a, samo ne znam da li ce biti neke razlike posto sam negde procitao da ovaj ECMAScript sadrzi sve sto i ostali.
morando je offline   Odgovorite uz citat