BusinessObjects Board

Problem with Match() and escape character

Hello,

I’m trying to use Match() in the variable editor to find the string “a5e016228**” in my data.

Use the escape character “” in the search pattern does not work for me, because the validation of the variable editor removes the “” without asking.

I also tried to build the search pattern using Char(): the string was built correctly to “a5e016228**”, but Match() still does not match.

Any hints are highly appreciated - thank you!

Best regards,
mime


mime (BOB member since 2012-08-06)

Is a workaround, but maybe use the replace function to change the “*” characters to another character (e.g. “~”) and then do a match on that.

e.g.
=Match(Replace([Object];"*";"~");“a5e016228~~”)


Darth Services :uk: (BOB member since 2007-11-20)

Works for me:

=Match(URLEncode([String]);"*"+URLEncode("a5e016228**")+"*")

…and will also handle “?” characters in the test string too.

HTH

NMG


mcnelson :uk: (BOB member since 2008-10-09)

Guys, thank you very much for your quick advice - works like a charm!!

mime


mime (BOB member since 2012-08-06)