Scenario
User needs to use a special character (such as period, asterisk, plus sign) in a REGEXP formula.
In REGEXP, special characters are used to define patterns for searching and matching within strings.
For example:
- Period (.): Matches any single character except newline.
- Asterisk (*): Matches zero or more occurrences of the preceding element.
- Plus Sign (+): Matches one or more occurrences of the preceding element.
Solution
To include special characters in a regular expression (REGEXP) formula in NetSuite Saved Search, you typically need to escape those characters with a backslash (\) to ensure they are treated as literals rather than special characters in the regular expression pattern.
Sample formula: REGEXP_SUBSTR({name},'.*\..*')
- The pattern here will return anything that has a period in name, like "Item.1" or ".item" or "item."
-----
If you find this information useful, let us know by reacting or commenting on this post!