I have string:
one line
second line
magic line foo
third line
How to match full line with foo only using keyword foo
?
So, I can match foo
using /foo/g
, but I don't know how to match full line.
Thank you for any help.
you can try this:
^.*foo.*$
it will match full line containing foo
Regex101Demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With