This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have two RegEx tools in my workflow. The first one aims to identify if part of the string matches a criteria, for analysis purposes. The second one extracts that specific string part for reporting purposes.
Here is the funny thing, the latter works fine the first doesn't work and provides FALSE values only.
This is my RegEx for matching (this one doesn't work:
This is my RegEx for parsing (so this one works):
Does anyone notice what might be going wrong? Note, it is not the brackets, I tried that one already.
I can guess what might be wrong in here. Your first scenario is a match, how match works is your input should be exact match to the regex. Eg: your regex will only match "BEN 23" but not "some text BEN 23 some text" to catch second scenario your regex should be something like below that it checks whether the regex is there in any part of string.
In parse it tries to find whether the regex is there in part of the string even in between hence it would work for both scenarios and captures.