Quantcast
Channel: CodeProject Latest postings for Regular Expressions
Viewing all articles
Browse latest Browse all 224

Find Sequence of alphabets in the string

$
0
0
I need to find 5 sequence of alphabets has exists in a given string using regular expression.

Sequence which should check in any of the form like ABCDE, BCDEF, DEFGH, EFGHI,......,PQRST,...,VWZYZ.

Eg.

1) ABCDECODEPROJECT - Match (because "ABCDE" has exists in the string)

2) TESTSTRING - Not Match (because No 5 sequence of alphabets)

3) SAMPLEQRSTUEND - Match (because "QRSTU" has exists in the string)

4) WEBSITELMNOPEND - Match (because "LMNOP" has exists in the string)

5) QUESTIONANSWER - Not Match (because No 5 sequence of alphabets)

Can you help me on build regular expression to check all possible combination in alphabets?

Viewing all articles
Browse latest Browse all 224

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>