Regex extractor not working with alternative anchors (word a OR word b)

It seems as if the regex extractor is not working with the specification of two or more alternative anchors. In my example I’ve either “customer number” OR “cust. nr.” as anchors in my docs. And I want to extract the id which is the next word. The default regex would be something like “(‘customer number’|‘cust. nr.’)\s”([0-9]*)". I don’t want to have the string “customer number” in the result. But it seems as if the round brackets () are used to indicate the captured result in UiPath.

Example string “bla bla customer number 1234 and here comes bla bla again cust. nr. 1234 bla text”

1 Like

@NielsF Welcome to UiPath community

You can use this Regex

Refer this to use regex in assign activity

1 Like

Hi Indra … thank you very much for you fast response. I didn’t try the “positive lookbehind” … but that worked directly. Thank you again.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.