Relative Content

Tag Archive for regex

How to exclude a prior match from a future match

I’m trying to write a regex, where the same group of terms is looked for twice, but I want to avoid matching the same term twice. If a term is found in the first group, it should not be matched in the second group.

Several conditions in one Regex expression

I am trying to validate a .csv field that must be numeric. Regex for this is pretty straightforward. However, the field can have multiple numbers. In that case, they must be comma separated and the entire field must be enclosed in double quotes like this “23,567,1”. I came up with this Regex to validate this