prints 'Opening extended comment' but does not for the line/* sdfthrow OtherException
Basically so long as the '/*' hasn't been preceeded with a throw then it should print out opening the comment. I've got the following expression in place.throw new Exception() /* asdfasdf
Is my understanding this expression correct? Would folks mind if I explain what I think is going on from left-right?if ($line =~ /^.*\/\*((?:(?<!throw)).*$/ ) { debug("Opening extended comment"); }
/^ matches the start of the $line string
.* says that the start can be proceeded by any number of characters
\/\* matches the '/*' string
(?:(?<!throw)) means so long as /* isn't preceeded in the string by the word throw $line still matches
.*$ means that any number of characters can proceed the /* upto the end of the line
My understanding's obviously incorrect cos eh.. it don't work for a lad. Any help would be greatly appreciated, Mark.
In reply to Re: Can't match negated words.
by perlgags78
in thread Can't match negated words.
by perlgags78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |