Help with RegExp (read from PDF)

Hi all,

I need some help with a regexp and hope you can help me.
Example rows look like this (from a PDF):

  • Trunstavagen 9 1234567-8
  • Trunstavagen 923 12345678
  • Trunstavagen 1234567-8
  • Trunstavägen 956

I would want to get the value “12345678” or “1234567-8”. The Format is always like this.
In the last example row, there is no value, and I would want to get an empty value (no value).

What is a good RegExp I can use for this?

Hi,

You can use Matches Activity to do it.
The Pattern property will be "(\d{7}-\d{1}|\d{8})$". And Multiline in the RegexOption should be checked.

Regards,

Yoichi

1 Like

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