$ parrot examples/assembly/pcre.imc "abcdef12" 'bc(.)([a-z]+)' abcdef12 =~ /bc(.)([a-z]+)/ ok: 3 from 1 to 6 matched: 'bcdef' all matched: 'bcdef' (1) matched: 'd' (2) matched: 'ef'
pcre.imc dynamically loads libpcre and performs a pattern match on the commandline args given.
As its for sure useful[1] to have pattern matching available, the questions arise:
Do we want PCRE in core?
Should it remain an external library?
If the latter, some wrappers would be handy to simplify matching and extracting results.
[1] I'm thinking of booting the real rule machine for perl6. Other languages are using PCRE directly or at least almost the same regex flavor.
Comments welcome leo