You are right on all counts. I do not know why the extra brackets are needed. I must sleep on it.
:)
qr{\A ipv6 | alt \Z}imxs
Its either begin string with ipv6
or end string with alt
other regex tools, ppixregexplain.pl ...
$ perl -MYAPE::Regex::Explain -e " print YAPE::Regex::Explain->new( qr +{\A ipv6 | alt \Z}imxs )->explain " The regular expression: (?imsx:\A ipv6 | alt \Z) matches as follows: NODE EXPLANATION ---------------------------------------------------------------------- (?imsx: group, but do not capture (case-insensitive) (with ^ and $ matching start and end of line) (with . matching \n) (disregarding whitespace and comments): ---------------------------------------------------------------------- \A the beginning of the string ---------------------------------------------------------------------- ipv6 'ipv6' ---------------------------------------------------------------------- | OR ---------------------------------------------------------------------- alt 'alt' ---------------------------------------------------------------------- \Z before an optional \n, and the end of the string ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------
[Visual of regex at 'rxrx' line 0] [step: 5] \A Match only if at start of string ipv6 Match a literal sequence ("ipv6") | Or... alt Match a literal sequence ("alt") \Z Match only if at end of string (or final new +line)
In reply to Re^3: Roughly matching an ipv6 address with sql wildcard
by Anonymous Monk
in thread Roughly matching an ipv6 address with sql wildcard
by neilwatson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |