0

I'm trying to find email within text that is being followed by a key word 'domain' preg_match_all("/domain.+\b([a-z0-9\-]+\.[a-z]{2,3})/im", $input_lines, $output_array);

my input data is

here is some text
capture this domain hi-there-welcome.co
and this domain should be captured yes90well.com
but not this link nolink.com
but not this line of no domain on it

I should be able to capture hi-there-welcome.com and yes90well.com

Kal
  • 948
  • 17
  • 30

0 Answers0