Regex skip one row

How can i skip one row with regex and grab a value

Like this:

Birthday
The sun is red and the ocean is blue.
1966.
I want to search on “Birthday” and grab 1966 to my excel.
Is it some one of lookahead or lookbehind?

Hi @Anders_Dahl
Based on regex you can grab the value as Birthday
\d+

Thanks
Ashwin S

Yes. But i want to use this one

(?<=Birthday) + some code

Then grad the value 1966.

Cheers @AshwinS2

Hi,

How about the following?

System.Text.RegularExpressions.Regex.Match(strData,"(?<=Birthday\r?\n.*\r?\n)\d+").Value

Regards,

I dont get to match this. I try this code on regex site.

I stop on the row after Birthday. I need it go one more row down.

Cheers @Yoichi

hi,

Which site do you use?
Some online regex test site are not compatible with .net regex.
Can you try the following site which uses .net regex.
http://regexstorm.net/tester

Regards,

1 Like

Big thanks my friend!

It was the site that did it :smiley:

Cheers @Yoichi

1 Like

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