Regular expression for numbers in webMethods 10 is not working

Debatable, but I do understand the concern about regex. Easy to get them wrong. As with many computing topics, takes time to understand and get comfortable with them. :slight_smile:

It is likely that “regular expression” in the DSP context is not regular expressions at all. Found this from years ago:DSP regular expressions (ifvar matches)

“It just uses * and ? as kind of wild card.”

This is from Xiaowei Wang back in 2015. In that thread he indicates he patched it to make it support regex – but that would apply to his own installation.

So mystery solved I think – ifvar matches support wildcards, not regex. Even the example in the help doc for ifvar implies this:

For example: %ifvar carrier matches(‘UPS*’)%.

If that were regex, it would match strings starting with UP followed by 0 or more S chars. Unlikely to be useful. A regex for this would be ‘UPS.*’

Documentation bug IMO. And would be nice if in addition to the math operators it would support regex (and maybe wildcards).

1 Like