1

what is the regular expression for showing whole line if it contains particular string?

source string is "ABC: i am your father" and I need to show everything on the line after "ABC:" so the final output is "i am your father".

Thanks.

1 Answers1

0

This regex will put everything after abc: into capture group 2

^ABC:[[:space:]](.*)

Input text: ABC: i am your father

Matches:

[0] => ABC: i am your father
[1] => i am your father
Ro Yo Mi
  • 14,790
  • 5
  • 35
  • 43