Ave!
Is there a simpler way to use Regexp::Common patterns in a Regexp::Grammar?
thanks,use 5.026; use Data::Dumper; use Regexp::Common qw[ delimited ]; use Regexp::Grammars; =Does NOT work! my $grammar = qr{ <token: Quoted_String> ($RE{delimited}{ -delim => q{'} }{ -esc +=>q{'}}) }; =cut my $pattern=''.$RE{delimited}{ -delim => q{'} }{ -esc=>q{'}}; my $grammar = qr{ <nocontext:> <TEST> <rule: TEST> <Quoted_String> <token: Quoted_String> $pattern }; if (q{'some string with containing a '''} =~ $grammar) { warn Data::Dumper->new([\%/],[qw(*/)])->Deepcopy(1)->Indent(1)->Ma +xdepth(3)->Sortkeys(1)->Dump(),q{ }; };
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |