Regex : How do I recognize multiple patterns in one expression to gather a string? (UIPATH)

You can use:

(?<=Item)(.*?)(?=Status)|(?<=Code)(.*?)(?=Category)

Demo

If you want both in the same match you could do:

(?<=Item)(.*?)(?=Status)[\s\S]*?(?<=Code)(.*?)(?=Category)

Demo

To get 02430 , 03770 from this regex, combine group 1 and group 2 into a single string in a concatenation external to this regex.

You can come close with a regex substitution:

/[\s\S]*?(?<=Item)(.*?)(?=Status)[\s\S]*?(?<=Code)(.*?)(?=Category)|[\s\S]*/$1$2 /

Demo

Read more here: Source link