in reply to Re: Re: commenting regular expressions?
in thread commenting regular expressions?

You have to put /x on the expression when you declare it. Also, as said, escape the literal spaces in the tags, or use \s if you don't mind matching any whitespace.
my $pattern = qr{ <PgfTag\ `Normal\ \(T\)'> \s* \n \s* <ParaLine \s* \n \s* <String\ `$oldLabel'> \s* \n }x;

Replies are listed 'Best First'.
Re: Re: commenting regular expressions?
by SeekerOKnowledge (Initiate) on Sep 04, 2003 at 18:28 UTC
    Thanks! I had overlooked the spaces within the strings to be matched. That was it!