04-22-2025 03:44 PM
Hi All,
With my limited understanding of regex, I am trying to find a space that is not preceded by a colon. Trying "(?<!:)" on regex101 works:
but not when I use the Match Pattern VI. Does that VI not work with a negative look behind? Am I formatting it wrong? Is there a better way to do my search?
Thanks!
John
Solved! Go to Solution.
04-22-2025 04:14 PM
04-22-2025 04:40 PM - edited 04-22-2025 04:43 PM
Plain ol' Match Pattern should suffice for something this simple. I neglected to save and attach a VI, but this is pretty self-explanatory:
EDIT: since the primitive doesn't support capturing groups (the parenthesis syntax), the match substring output will include the non-colon character immediately preceding the space of interest. I'll assume you're mostly interested in the offset past match numeric.
Hope this helps!
Best regards,
Dave
04-23-2025 08:57 AM
Thanks Dave and Ben,
I didn't realize that Match Pattern used a more limited version of regex. I thought I only needed Match Regular Expression if I needed sub-matches, etc. Since I was trying to break apart a string, using the space not preceded by a colon as the delimiter, Match Regular Expression in a loop seems the way to go.
Thanks again!
Regards,
John