|
Boost Users : |
From: John Maddock (john_at_[hidden])
Date: 2007-10-02 05:09:56
Mike Marchywka wrote:
>> Hi,
>> I'm new to boost and not all that familiar with Perl regex. However,
>> I have my own
>> code for using Perl regex libraries for finding interesting features
>> in DNA (
>> http://www.mail-archive.com/bio_bulletin_board@bioinformatics.org/msg01382.html
>> )
>>
>> I recently added boost to work along with Microsoft's greta code.
>> However, I now
>> have a problem with regex exploding.
>> The questionable regex is presumably,
>>
>> (?<=GU.*?TACTAAC.{20,40}AG|^).*?(?=GU.*?TACTAAC.{20,40}AG|$)
Variable length look-behind isn't support by Boost.Regex (or by Perl for
that matter).
Sorry I can't be more helpful at present: although it seems as though
lookbehind isn't really needed in this case - you could remove the
lookbehind and use a marked sub-expression to identify the section you want
instead.
So I think (?GU.*?TACTAAC.{20,40}AG|^)(.*?(?=GU.*?TACTAAC.{20,40}AG|$))
would be equivalent, with $1 containing the section you're interested in?
HTH John.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net