Greetings. This code returns the error 'Search pattern not terminated'. I think it's the '{' inside the regex, but shouldn't that be automatically escaped by \Q\E?
#!/usr/bin/env perl use strict; use warnings; my $regex = qr{ \n (?: \QI'll be good.\E | Hushing | Hrumph | \Q>:[\E | \Q:-(\E | \Q:(\E | \Q:-c\E | \Q:c\E | \Q:-<\E | \Q:< +\E | \Q:-[\E | \Q:[\E | \Q:{\E | \Q:-|\E | \Q:@\E | \Q>:(\E | \Q:' +-(\E # here? ^^^^^ | \Q:'(\E | \QShutting up now.\E | \QBut, but...\E | \QI'll be quiet.\E ) }mix;
Neil Watson
watson-wilson.ca
In reply to Regex Search pattern not terminated error by neilwatson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |