Perl supports pattern spanning multiple like this example:
$program =~ s {
/\* (?# Match the opening delimiter.)
.*? (?# Match a minimal number of characters.)
\*/ (?# Match the closing delimiter.)
} []gsx;
I tried to do some thing similar with ksh93 but I get:
ksh93 -x -c $'[[ "x x" == ~(P)x(?#a\ncomment)\nx ]] && print ok'
ksh93: syntax error at line 4: `x' unexpected
If I replace the $'\n' with a space it works:
ksh93 -x -c $'[[ "x x" == ~(P)x(?#a\ncomment)\\ x ]] && print ok'
+ [[ 'x x' == ~(P)x(?#a$'\n'comment)\ x ]]
+ print ok
ok
My guess is that newline, tab and vertical tab needs to be added to
the same list which escapes blanks for perl regex.
Olga
--
, _ _ ,
{ \/`o;====- Olga Kryzhanovska -====;o`\/ }
.----'-/`-/ [email protected] \-`\-'----.
`'-..-| / http://twitter.com/fleyta \ |-..-'`
/\/\ Solaris/BSD//C/C++ programmer /\/\
`--` `--`
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users