This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Greedy-Non greedy Pattern search

Hi all!

I am trying to understand the following regular expression.

enter image description here

In the above figure the author have used regular expression to identify G4 motifs in greedy and non-greedy fashion.

  • Non-overlapping Greedy (?:(G{3}[ATGC]{1,7}){3}G{3})
  • Non-overlapping Non-Greedy (G{3}[ATGC]{1,7}){3}G{3}
  • overlapping Greedy (?=((G{3}[ATGC]{1,7}){3}G{3}))
  • overlapping non-Greedy (?=((?:(G{3}ATGC{0,6}){3}G{3})))

However I am unable to understand the utility of ?: and ?= and combination thereof (used in last regular expression). Can anyone help? I used the regex

genome

0 answers

No answers yet.

Log in to answer this question.