4 ms·
Afaik Python, like most open source languages, use the PCRE lib, Perl Compatible Regular Expressions. Google it. PCRE isn't as good as Perl's regexps, but not
by berntb 15y ago
Afaik Python, like most open source languages, use the PCRE lib, Perl Compatible Regular Expressions. Google it.
PCRE isn't as good as Perl's regexps, but not bad. (I've helped people with PCRE problems that worked in Perl.)
Edit: I googled myself. :-) The Python lib isn't pcre (anymore), it is something home rolled. The answer to the parent question about inspiration is: Most everyone has copied the Perl syntax (except, irritatingly, Emacs).
Edit 2: herge -- Perl is ~ a superset of awk. Use that. (Check -n and -e flags in perldoc perlrun.)
- herge 15y agoVim and awk use the old syntax, and that irritates me to no end.