Regular expression - get line after specific word

I need to get the entire line with regular expression…

I need to get the line after the line with the word “Indrykningsdato”

Hi @eltmo

Kindly shared the input and output with us

Regards
Gokul

input.txt (1.5 KB)
output.txt (170 Bytes)

Hi @eltmo

Try this regex “(?<=Indrykningsdato.*\n).*”.

Regards,
DP

Mhhh dosnt work…

Hi @eltmo

\d.{2}\d.{2}\d.{4}.*

image

I missed an *, try again with this…

(?<=Indrykningsdato.*\n).*

Hi @dpinto

Another way

System.Text.RegularExpressions.Regex.Match(YourString,"(?<=Indrykningsdato).*(\n.\d.{2}\d.{2}\d.{4}.*)").Groups(1)

Regards
Gokul

1 Like

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