Based on my reply in this thread here is the same post again, ready to be moved to the appropriate forum.

For some more elaborate and dynamic find/replace functions in TI, I was forced to do some cool stuff a while ago: regular expressions.
While not being exactly regular expressions as per definition, they offer a lot of flexibility and have become my golden hammer in many situations.

It works like this:

Define your original string

Define your filter expression

Define any replacement rules.

Example 1:
Here we do a simple replace. Replace any space characters with underscores.

Example 3:
When not replacing stuff, sometimes we just want just look for stuff in strings. This will give you the FIRST occurrence of the match based on the expression in the string, and the length of the matched string.

I'm sorry but I think I found a small glitch in the Sys_Regex_find.pro code.

If the start of an expression is found at the end of the string but string ends before the expression is clompletely parsed there is a "false positive" result.
Please have a look at the following example:
String = "73257"
Expression = "73207"
results in Regex_find_position=1

The first round works as expexted. A match is found until position 4 of the string.
But with expression moving throug the string, the first "7" of expression matches the 7 at position 5 of string again.
Unfortunately the process then ignores the rest of expression which could not be tested against string.

I implemented the following "patch":
I inserted a test if there is some expression left if string parsed ended before to clear the result vMatchString