Which part of the string abl230cde will be matched by the re
Which part of the string: abl230cde will be matched by the regex described below? C[a - z]?)([0 - 9]+)([a - z]+) 1230cde Nothing b1230cde ab1230cde
Solution
ab1230cde , whole string would be matched by the given regular expression:
because in starting it says any alphabet from a to z hence it matches a, then ? in that says anything could be there hence matches b..ab
now it says 0-9 that means any number from 0-9 + simple after that says anything after that hence a-z alphabtes will fit in
![Which part of the string: abl230cde will be matched by the regex described below? C[a - z]?)([0 - 9]+)([a - z]+) 1230cde Nothing b1230cde ab1230cde Solutionab1 Which part of the string: abl230cde will be matched by the regex described below? C[a - z]?)([0 - 9]+)([a - z]+) 1230cde Nothing b1230cde ab1230cde Solutionab1](/WebImages/10/which-part-of-the-string-abl230cde-will-be-matched-by-the-re-1005420-1761518261-0.webp)