Reading pdf with regex. how to continue when he's not finding the object?

im extraction pdf’s sometimes the location of the object I want to extract is moved 1 line in the pdf.
is it still possible to extract without getting the error? because the robot doesn’t continue when he’s getting that object error.

Hey @Nightowl_music

Put the pdf extraction logic inside Try-Catch Block.

ok I will try, most important is if he doesn’t find the specific text. that he will continue


It will return True if something was found.
Return False if not match was found.

1 Like

is use activity Matches not Match… so you recommend to use Match activity ?

@Nightowl_music - you can use matches or Match…

If you matches activity then you check for .count variable …if the count is >= 1 then you can continue the process…

system.text.regularexpressions.regex.matches("yourstring", "pattern").count

Hope this helps…