Hello,
I just changed slightly the pattern:
Find: U(?=[^a-z0-9\r])|U(?=[ACGTU]+?)
in the first part I added \r to avoid that a "u" is detected at the end of 
the line with ">". In the second part I added a U in [ACGTU] to assure that 
the Us in double Us (ex UUU) are detected. In addition I eliminated the 
second back reference in the second part, to avoid that the replacement Ts 
are added.
Now everything works fine

So the final pattern is:
Find: U(?=[^a-z0-9\r])|U(?=[ACGTU]+?)
Replace: \1T

Thanks a lot 
Achim


Le dimanche 12 avril 2020 19:32:34 UTC+2, Bruce Van Allen a écrit :
>
> On 4/12/20 at 10:17 AM, [email protected] <javascript:> (Bruce Van Allen) 
> wrote: 
> >Try this: 
>
> ADDED: I meant to say you can do it all in one "Replace All" step. 
>
> >Find: 
> >U(?=[^a-z])|(U(?=[ACGT]+?)) 
> > 
> >Replace: 
> >\1T 
> > 
> >The first part U(?=[^a-z0-9]) is to eliminate the 'U' in the 
> >'>' line. NOTE: this assumes that those 'U's are always 
> >followed by a lower-case letter or a number. 
> > 
> >The second part finds any 'U' followed by one or more of any of 
> >'A, 'C', 'G', or 'T'. 
> > 
> >Without that first part, the second part of the match will 
> >catch all but a 'U' at the end of the line. 
> > 
> >HTH 
> -- 
>
>    - Bruce 
>
> _bruce__van_allen__santa_cruz__ca_ 
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/f3196f76-1112-4701-b018-c1696fed6760%40googlegroups.com.

Reply via email to