[Bioperl-l] regular expression help!

Aerts, Jan Jan.Aerts at wur.nl
Sat Jan 15 04:24:39 EST 2005


Without taking the time to look at the actual expression (sorry): a nice aid for developing more complicated regexes is the Regex Coach (http://www.weitz.de/regex-coach/). It allows you to experiment with regex and shows you the result interactively.

Good luck,
Jan Aerts


-----Original Message-----
From:	bioperl-l-bounces at portal.open-bio.org on behalf of Marc Logghe
Sent:	Sat 15-Jan-05 09:34
To:	Guojun Yang; bioperl-l at portal.open-bio.org
Cc:	
Subject:	RE: [Bioperl-l] regular expression help!
Hi,
In the part (??{$rev=reverse(\2 =~ tr/ATCG/TAGC/i);}) I have my doubts about the double question marks.
In case you don't want capturing braces and you want to execute code, I think it should look like:
(?:?{$rev=reverse(\2 =~ tr/ATCG/TAGC/i);})
In case you want to capture, then there is one ? too many because the syntax is '?{ code }' and not '??{ code }' for executing code in a regex.
HTH,
Marc 


-----Original Message-----
From: bioperl-l-bounces at portal.open-bio.org on behalf of Guojun Yang
Sent: Fri 1/14/2005 8:12 PM
To: bioperl-l at portal.open-bio.org
Subject: [Bioperl-l] regular expression help!
 
Hi, Everybody,
I was trying to use a regex recognizing a patter of inverted repeat DNA seq flanked by direct repeats (see below), it returns errors saying "(?{...}) not terminated or {...} not balanced. Can anybody help me sorting this out?
The regex I have is:
$regex =~ /\S+(\S+)(\S{10}).*(??{$rev=reverse(\2 =~ tr/ATCG/TAGC/i);})\1.*/i;
Thank you,
Yang


_______________________________________________
Bioperl-l mailing list
Bioperl-l at portal.open-bio.org
http://portal.open-bio.org/mailman/listinfo/bioperl-l




_______________________________________________
Bioperl-l mailing list
Bioperl-l at portal.open-bio.org
http://portal.open-bio.org/mailman/listinfo/bioperl-l







More information about the Bioperl-l mailing list