Variable consists of 15 digits number, I want to read first 4 digit, next 5 digit & rest. How to read those value

If you want to learn Regex - check out my Regex MegaPost particularly Section 5 - Learn Regex in 60mins

Essentially:
“\d” means a digit.
The curly brackets mean “how many times”. {5} = 5 times exactly
The + symbol means “1 or unlimited times”
The curved brackets ( ) simply break up the pattern into groups.
\b means a word barrier - like the start or end of a word.

2 Likes