[Bioperl-l] regular expression help!

Aerts, Jan Jan.Aerts at wur.nl
Sat Jan 15 09:17:28 EST 2005


You're right... Should have looked at the actual expression.
Idea: is it possible in this case to call subroutines from within a regex and evaluating them using the 'e' switch?

j.



-----Original Message-----
From:	Marc Logghe [mailto:Marc.Logghe at devgen.com]
Sent:	Sat 15-Jan-05 12:31
To:	Aerts, Jan; Guojun Yang; bioperl-l at portal.open-bio.org
Cc:	
Subject:	RE: [Bioperl-l] regular expression help!
Hi Jan !
Nice goody indeed.
But I am afraid that the extended regular expression feature ${code} is not supported by regex-coach.
Maybe this had to do with the fact that this regex feature seems to be highly experimental and might be changed or even deleted in future Perl versions.
Cheers,
Marc


-----Oorspronkelijk bericht-----
Van: bioperl-l-bounces at portal.open-bio.org namens Aerts, Jan
Verzonden: za 15-1-2005 10:24
Aan: Guojun Yang; bioperl-l at portal.open-bio.org
Onderwerp: RE: [Bioperl-l] regular expression help!
 
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





_______________________________________________
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