-----Original Message----- From: JupiterHost.Net [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 12:15 PM To: beginners@perl.org Subject: Re: regex matching conditionally
>Timothy Johnson wrote: >> Will the string always have the two quotes in the same place and only >> one per string? What about something like this? >> >> /.*?\{([^\}]*)\}(?=.*")/gi > >I tested it out and it appears to be perect! Thank Mr. Johnson :) > >I love when I learn a new tidbit! Originally I tried to put a look-behind assertion that was basically the opposite of the look-ahead assertion to make sure we'd already passed the first double-quote, but it turns out that you can't make a variable-length look-behind assertion in a regex for some reason. I can see that it will be available in Perl 6, but that's a long way (and a lot of adjustment) away, I think. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>