Page 1 of 1

regular expressions??

Posted: Tue Aug 05, 2003 8:38 am
by $0.05$
okay, i have a text file that im searching through, and it has many instances with text formated exactly like this

Code: Select all

<p class="bizPhone">Phone:
          <strong>
          їb]їSOME PHONE NUMBER IN HERE]ї/b]
          <\/strong><\/p>
now what i want to do, is get the phone number.

here is the code that i have

Code: Select all

<?php
	preg_match_all("/          <p class="bizPhone">Phone:
          <strong>
          (.*?)
          <\/strong><\/p>/", $info, $array);
?>
but it's not catching it - anyone know why?

Posted: Tue Aug 05, 2003 8:51 am
by $0.05$
okay, i figured it out, it should be like this

Code: Select all

<?php
preg_match_all("/          <p class="bizPhone">Phone:\n          <strong>\n          (.*?)\n          <\/strong><\/p>/", $info, $array);
?>