use YAPE::Regex::Explain; print YAPE::Regex::Explain->new(qr/this.*(?:that)?(?!another)/) ->explain; __output__ The regular expression: (?-imsx:this.*(?:that)?(?!another)) matches as follows: NODE EXPLANATION ---------------------------------------------------------------------- (?-imsx: group, but do not capture (case-sensitive) (with ^ and $ matching normally) (with . not matching \n) (matching whitespace and # normally): ---------------------------------------------------------------------- this 'this' ---------------------------------------------------------------------- .* any character except \n (0 or more times (matching the most amount possible)) ---------------------------------------------------------------------- (?: group, but do not capture (optional (matching the most amount possible)): ---------------------------------------------------------------------- that 'that' ---------------------------------------------------------------------- )? end of grouping ---------------------------------------------------------------------- (?! look ahead to see if there is not: ---------------------------------------------------------------------- another 'another' ---------------------------------------------------------------------- ) end of look-ahead ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------
_________
broquaint
In reply to Re: Regular expression to English translation
by broquaint
in thread Regular expression to English translation
by Wassercrats
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |