
japhy
Enthusiast
/ Moderator
Feb 20, 2001, 7:16 AM
Post #2 of 2
(681 views)
|
|
Re: pair of quotes with no escaped quotes in it?
[In reply to]
|
Can't Post
|
|
Ok, I suggest this approach:
$string = q{This is \'not\' it yet... 'this \'is\' it!'}; ($quoted) = $string =~ m{ ^ # advance past all the non-wanted stuff [^'\\]* (?: \\. [^'\\]* ) * # match and save what we want ' ( [^'\\]* (?: \\. [^'\\]* ) * ) ' }x; For an explanation of that regex, enter it into the OGRE. Jeff "japhy" Pinyan -- accomplished hacker, teacher, lecturer, and author
|