develooper Front page | perl.perl6.users | Postings from February 2020

PCRE -> Perl 6 RE

Thread Next
Paul Procacci
February 19, 2020 04:03
PCRE -> Perl 6 RE
Message ID:
Hey Guys,

I've got a bunch of source files with PCRE's like the following:


I have a program that generates other perl6 source files, by way of reading
the initial source files.
It was my intention to simply pass along this regex to the resulting output
file for use in subset's like the following:

subset ThisType of Str where * ~~ m:P5/[\p{L}\p{Z}\p{N}_.:/=+\-@]+/;

I was going to at first hope add a PCRE adverb of sorts but that doesn't
I then was going to stick the Perl5 adverb on it ... but again no luck as
it pukes on the escaped p's.

Is there anything smart enough to translate these tokens into either:

a) perl5 syntax for use with the Perl5 adverb or
b) perl6 syntax for use with built-in perl6 re's.
c) A module that anyone's familiar with that isn't publish or
d) I'm simply SOL?



:(){ :|:& };:

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About