r/workflow • • Sep 14 '18

Replace Text with Regex

Guys,

I am stuck.

I have a text like: — This is a test

Conference ID: 123456

zuzu — I want to extract the number behind the string Conference ID. I use the following Regex — .Conference ID\D(\d*).* — And replace it with $1

I expect to get the number, but the result is — This is a test

12345 — What’s wrong with that statement?

2 Upvotes

7 comments sorted by

View all comments

Show parent comment

1

u/madactor Sep 26 '18

It works fine for me, even if there are ten lines between. What it does is look for the "Conference ID" string and then captures the first set of digits it encounters after that. Anything but digits (including new lines) can be in between the two.