Then I think the expression you started off with, part [023]555, is the one you want for the example given.
No. [023] will match when 0, 2, or 3 occurs anywhere within the string. It will, and should, match both your examples.
To make sure I understand, you’re looking for a regex way of implementing this:
BRANCH on someVar
0: SEQUENCE (do something)
2: SEQUENCE (do the same thing as 0)
3: SEQUENCE (do the same thing as 0 and 2)
$default: SEQUENCE (no match)
If I understand what you’re after, then /^0$|^2$|^3$/should do what you want.
Unless you anchor the regex with ^ or $ (beginning of string or end of string), then the pattern can occur anywhere within your string. Using your example, expression part [023]555 will match:
part 0555-A
part 2555-A
part 3555-A
junk part 3555-A fiddle faddle
garbage part 0555xxxyyyzzz
this string will not match
part 02555-A
But [023] will match all of them. Because this expression says “match if 0, 2 or 3 occur anywhere within the string.”
#Integration-Server-and-ESB#webMethods#Flow-and-Java-services