on Tue, 04 Jun 2002 17:14:54 GMT, Barry Jones wrote:

> Hi,
>      I'm trying to do a patter match for everything contained within
> {{ stuff }}.  Now I've gotten this to work just fine with ** stuff **,
> ^^ and a several others, but I can't get curly braces to work and I have
> no idea why.  I've tried escaping them with \ and not doing and what
> have you but it just won't work.
> [...]
> $body =~ s/\{\{(.*?)\}\}/\<b\>$1\<\/b\>/g;

$body = "It {{works}} for {{me}}";
$body =~ s/{{(.*?)}}/<b>$1<\/b>/g;
print $body; # prints It <b>works</b> for <b>me</b>

The escape chars on {}<> are not necessary.
 
What is your input, and how do you expert your output to look like?

-- 
felix

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to