regex for a string ,\"16 questions\", -
i not in regex , spent time figure out how search below pattern:
,\"16 questions\",
this constructed .\"[0-9,]+ questions\".
think close not sure how much. can please correct it. numeric value can have comma in when number crosses 1k. e.g 2,500 questions.
,"\d{1,3}(,\d{3,3})*\squestions?",
explanation:
\d{1,3}
= 1~3 decimal digits(,\d{3,3})*
= comma , 3 decimal digits, whole group repeating 0~n times\s
= whitespaces?
= letters
can missing
these 2 parts give accurate recognition of possible numbers.
if backslashes in text true backslashes, regex including them be
,\\"\d{1,3}(,\d{3,3})*\squestions?\\",
Comments
Post a Comment