It's a question for Python's regular show!

Asked 2 years ago, Updated 2 years ago, 19 views

I want to find three UAA UGA UAGs, so I don't know how to search A and U[AG]A and UAG, do I have to find them like this?

python

2022-09-22 20:19

1 Answers

U(AA|GA|AG)

We can do it like above.

In the regular expression group (), | means OR.

It starts with U, AA, GA, or AG, and you can write it as above.


2022-09-22 20:19

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.