trying to capture everything before first occurence of (
in
- name (temp)
- name alt (temp1) (temp2)
this is not working in DO
RegExS(name, "^([^\(]*)", "\1");
but does work at
RegExr: Learn, Build, & Test RegEx
regex101: build, test, and debug regex
etc...
David
2
Well,
I have this working.
I'll have to think more about your syntax.
This doesn't mean I think you are wrong.
lxp
3
Your regex is fine. It doesn't seem to work because RegExS
replaces the capture group with itself, see:
RegExS(name, "^([^\(]*)", "ABC")