Regex Help get text from multiline


please help, been trying for a day without success

i am trying to get the string of text after screen scrap

screen scrap returns multiline variable
i want to extract certain text only

below is the portion i cut out to focus on

more text on top
Item Number (270, 201, 330, 214)
C9330-9012P-C1 (384, 199, 465, 212)
MOTOR DC OUTPUT 2W (649, 199, 778, 212)
more text below

I want to capture the words “C9330-9012P-C1”
can’t figure out the Regex,
my image is find “Item Number” and go the the start of next line
start capturing until the space

only successful to start capture after “Item Number”
(?<=Item Number)(.*)


pls help

Hi @wilfred ,

if the string (and one’s like it) are consistant format, this should do it:


if not, then if I have examples of other strings that need capturing in the same regex let me know.

  1. a-zA-Z ↩︎


Can you try the following expression?

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=Item Number.*\n)[-\w]+").value

This won’t work in regex101. Please check by UiPath.


1 Like


the output was generated by screen scrapping

I manage to capture with wordsinfo

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