Page 1 of 1

Parse through text and find text

Posted: Sat Nov 21, 2009 10:00 pm
by JKM
I want to search through the text and find the following:
- Text inside double quotes where the line contains 'conID_<number(1,30)>'
Output:
echo '<strong>'.$quotes.':</strong> '.$conID.'.';

Edit: There can be multiple lines with different data inside the quotes and different conID. Example of input:
basd asgfdg bla bla bla asdfdsfsdf sd
fdgsfd gdfgssdfg "123 4567 89" fdg conID_3565765 dsfsdfs dsfsd sdf sdf s
gfsdg hgfhdf asf bla bla
fdgsfd gdfgssdfg "123 456790" fdg conID_3554355 dsfsdfs dsfsd sdf sdf s
fdgsfd gdfgssdfg "123 456 hey" fdg conID_35654665 dsfsdfs dsfsd sdf sdf s
In this case, the output should be like:
<strong>123 4567 89:</strong> conID_3565765
<strong>123 456790:</strong> conID_3554355
<strong>123 456 hey:</strong> conID_35654665