I am still relatively new to Regular Expressions.
Can somebody please demonstrate how to use a non-capture group in a function. For example:
I know that if I use the following:
Code: Select all
var := RegexReplace(string, "(Hello)/s(World)","$2")
Result: "World"... Easy-Peasy, but suppose I want to use a non-capture group. I am confused as how to make it work. I want to capture "World" by ignoring "Hello". So far I tried:
Code: Select all
pos := RegexMatch(string, "(?:Hello/s)World)", var) ;?: as in ignore "Hello"
Nevertheless, the result is still "Hello World". So what am I doing wrong here?