Copy required information in word file and store into variable

For example: Length(10)

I want to search for the word Length(10) in a word file, then copy the number inside the ( ). and then I want to store it in a variable.

How can I do it?

1 Like

Hi @anson,
Welcome to the Community!
Using word activities from UiPath.Word.Activities grab the proper word file (Read Text).
Then filter it through Matches activity using “(?=Length).+” expression.
image
Then do the expression this expression for catched word “(?=\d)\d+” and assign it to variable.
image

1 Like