Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: How to use Regexp::Common patterns in Regexp::Grammars?

by clueless newbie (Curate)
on Jun 09, 2022 at 16:44 UTC ( [id://11144596] : note . print w/replies, xml ) Need Help??


in reply to How to use Regexp::Common patterns in Regexp::Grammars?

Try Paraphilic infantilism. LOL - the baby carriage!

use 5.026; use Data::Dumper; use Readonly; use Regexp::Common qw[ delimited ]; use Regexp::Grammars; my $grammar = qr{ <nocontext:> <TEST> <rule: TEST> <Quoted_String> <token: Quoted_String> @{[ qq[(?: $RE{delimited}{-delim=>q{'}} +{-esc=>q{'}}) ] ]} }; if (q{'some string with containing a '''} =~ $grammar) { warn Data::Dumper->new([\%/],[qw(*/)])->Deepcopy(1)->Indent(1)->Ma +xdepth(3)->Sortkeys(1)->Dump(),q{ }; }; __DATA__