in reply to
Re^2: Determing if this regex matched
in thread Determing if this regex matched
Too much work!
my @items = ('"Title Text Example"', 'Title Text Example', ' Title Tex
+t Example ',' "Title Text Example"');
foreach (@items) {
if (s/^[\s"]+// or s/[\s"]+$//) {
print "$_\n";
}
}
-- Randal L. Schwartz, Perl hacker
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.