For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > August 2005 > regex for Err operator (//) in perl6









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author regex for Err operator (//) in perl6
Raga

2005-08-23, 6:56 pm

Hi, Iam trying to write a source filter using Filter::Simple to use the
Binary // (Err) operator in perl6. Iam having a tough time to construct
the regex for this. I do have a semi working regex to substitute

$foo = $bar // $baz ;

s/(.*\s*)(.*)\b\s*\/\/\s*(.*)\b/$1defined($2) ? $2 : $3/gm;

But I wanted to know if there was a better way of constructing the
regex

Thanks
Ragavendar

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com