Regular Expression

Hi All,

I am trying to use a regular expression in a trigger filter. My requirement is that it can have multiple spaces in a field. I was trying the following which is not working. can anyone please tell me a good regular expression for me to use. (%var% /“^ *$”/)

Thankyou…

if u r getting only the spaces… then remove the spaces using replace service in wmpublic package and have a string in filter with no spaces in it… just a thought.

Do trigger filters support regex?

Rob, yes triggers do support regex, but disadvantage is the filter condition will be on the IS and not Broker.

for matching one or more spaces / +/

–regards
DC

Are you sure ?

I have a trigger with a filter with

Reference = /^XXXX.*/

in Developer,
and it appears has

regexpMatch(Reference ,"^XXXX.*")

in the filter of the Broker.

I’m still using IS 6.5.

Thanks!!

It’s my mistake. Actually, not all regex conditions are valid in Broker. Those regex conditions invalid in Broker will be in IS Level. developer guide lists the regex not accepted in broker

-regards
DC

The ‘^’ signifies the beginning of the string and the ‘$’ signifies the end of the string. So the above regex only matches something that is ALL spaces.

/ */ will do 0 or more spaces
/ +/ will do 1 or more spaces (as pointed out already)


http://webmethodssag.blogspot.com