Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Match textpattern to match two words in a string

I am trying to set a textpattern to match two parts found in a string

The string:

First Part is before Second Part. Wonderful!

Every string which contains 'First Part' and 'Second Part' should match.

Using a reqular expression I'd go with: ^(?=.*\bFirst Part\b)(?=.*\bSecond Part).*$

But that expression as a textpattern does not match.

How to accomplish this using the Powerscript Match function?

Former Member
Former Member replied

If you want to test that your string contains First Part then Second Part, you can use the match function like this :

Match(ls_Test, "First Part.*Second Part")

But maybe you want something more ?

2 View this answer in context
Not what you were looking for? View more on this topic or Ask a question