[K12OSN] PHP regular expression question.

RiE roger.in.eugene at gmail.com
Fri Mar 3 17:40:12 UTC 2006


I know, it's off topic, there are just so many knowledgable people
here, someone will have the answer.
I have a string.  It could look like:   (I added the under_score to
break it so it won't display as a link in email.)
"blah blah blah <a hr_ef=moreblah.com>link</a>...  Other link here: 
<a hr_ef=otherlink.com"

Yes, the string could have an incomplete tag at the end.   What would
be the solution to get rid of the last incomplete tag.  It could be an
image tag, it could be an 'A HREF" tag.
It's acceptable to yield the string:
"blah blah blah <a hr_ef=moreblah.com>link</a>...  Other link here:  "

optionally, add in '...' like this:
"blah blah blah <a hr_ef=moreblah.com>link</a>...  Other link here:  ..."


Thanks.




More information about the K12OSN mailing list