I’m not quite sure what you are wanting the regex to match but since you have the ^ symbol inside the square bracket this acts to negate the \d, so the first part will be trying to match two non-digits. If you were wanting to use ^ to represent “start of line” then it needs to be before the square bracket. It isn’t necessary in this case.
I’ve attached a sample with several different regex patterns as an example
// returns A if format is nn/nn/nnnn , allowing 1 or 2 digits for month and day
// returns B if format is nnnn-nn-nn, allowing 1 or 2 digits for month and day
// returns C if format is nn-nn-nnnn, requiring 2 digits for month and day, else D
Note that if this is all you need to do, it is more easily (and probably more efficiently) done with a Rule Engine as follows:
Hi @Daniel_Weikert , I don’t think there is a list but in general the nodes that use are based on actual programming language need to add the extra backslash.
e.g. Requiring double-backslash:
String Manipulation, Column Expressions, Java Snippet
Not requiring double-backslash:
Row Based Rule Filter
Column Rename (Regex)
For the “scripting” nodes, there is a small visual clue as the colour of the string changes. If the String is not displayed as red when you enter a backslash, you need to enter a second one! This is because the script editor cannot determine that the string is being “closed” correctly, or something like that…
Rule Engine (doesn’t use double-backslash):
Even the java snippet node does have this visual clue, although it’s not quite as obvious because the colour changes from blue to black. Although it will also underline the line, and when you move off it will highlight it.
I think there might be some cases though where you need to enter a third backslash. It depends on how many “levels” of interpretation there are before it actually gets to run the resultant code, but maybe that’s a story for another day… or when I can find an example…
The main thing I think is to be aware that double-backslash may be a possibility so if you hit problems you have an idea where to look.