I have a text field. It contains names (usually two or three words).
Is it possible to extract only the first word in a script field in way using regular expressions? (eg ^(\S+) (.*)$ or ^(.+?) (.*)$).
I imagine you can just use the regular JavaScript regular expression support:
https://www.w3schools.com/js/js_regexp.asp
But I haven’t tested it myself.
Correct, the standard built in Javascript engine works within the scripts.
If you check out my repo there is a match example and a replace example (also includes a sample of creating a RegExp object as well if you look up a few lines).