Sorry for my previous misapprehension of your sample.
Try this:
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
On 4/12/20 at 8:01 AM, achim.quai...@gmail.com (archaeal) wrote:
Hello,
I would like to detect the lines starting with >.+ and replace
all U with T in the following line, but not in the line
starting with >
Example:
NeiUe166 1551 bp rna
AGAGAUUGAACAUAAGAGUUUGAUCCUGGCUCAGAUUGAACGCUGGCGGCAUGCUUU
Unc31652 1491 bp rna
AGGGUUUGAUCAUGGCUCAGGACGAACGCUGGCGGUGCGCCUUAUGCAUGCAAGUCG
Unc31653 1469 bp rna
AGGGUUUGAUCAUGGCUCAGAACGAACGCUGGCGGCAUGCUUCAGACAUGCAAGUCG
should look like:
NeiUe166 1551 bp rna
AGAGATTGAACATAAGAGTTTGATCCTGGCTCAGATTGAACGCTGGCGGCATGCTTT
Unc31652 1491 bp rna
AGGGTTTGATCATGGCTCAGGACGAACGCTGGCGGTGCGCCTTATGCATGCAAGTCG
Unc31653 1469 bp rna
AGGGTTTGATCATGGCTCAGAACGAACGCTGGCGGCATGCTTCAGACATGCAAGTCG
The search pattern should find the >.. line but make changes
only in the next line
Another possibility would be to search just in the "second"
line for U and replace with T
It would be great if someone has an idea.
Thanks a lot
archaeal
--
- 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 "supp...@barebones.com" 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 bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/r480Ps-10146i-BD50784200ED492CB317EC53251ED515%40Forest.local.