Is there a regex pattern that will match a string that contains repeated pattern, e.g.:
"a"|"b","c"|"d",...,"y"|"z"
Do you have any idea?
Thanks.
Is there a regex pattern that will match a string that contains repeated pattern, e.g.:
"a"|"b","c"|"d",...,"y"|"z"
Do you have any idea?
Thanks.
Maybe you are looking for something like this:
^"."\|"."(,"."\|".")*$
This will match a comma-separated list of sequences of form "
α"|"
β"
where α and β can be any character.
Just a note that to truly look for a repeated pattern, you can use grouping like so:
<(htmltag>).*\1
where \1 refers to the matched string in the 1st group repeated. Make sense?