Entering edit mode
5.1 years ago
rohitsatyam102
▴
920
Hi all!
I am trying to understand the following regular expression.
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
please read about ternary operators and zero length assertions.@ rohitsatyam102