I know, but I was going crazy and tried things that I didn't think would matter (and they didn't!). I didn't try the solution in the third reply, but I think I missed something elsewhere in my script, which I'm going to look for now. I'm preparing myself to feel stupid. | [reply] |
It looks like there is no update or comment option, so I guess I'll reply to you again. The following assignment:
$remainder =~s/<.*?a.*?href.*?>//i;
cuts nothing out, leaving the following in $remainder:
<a href="government.php" ONMOUSEOUT="imgInact('img2')"
ONMOUSEOVER="imgAct('img2')"><img border="0" src="gova.jp
+g" width="60" height="46" name="img2" alt="Arkansas Government"></a>
(unless I'm still missing something). I want only the </a> to remain. Am I doing something wrong? | [reply] [d/l] [select] |
I tested it and it removed the <a> tag, leaving <img border="0" src="gova.jpg" width="60" height="46" name="img2" alt="Arkansas Government"></a>. Do you want the <img> tag removed as well?
| [reply] [d/l] [select] |
Sorry... I was on a public computer with my time running out and I didn't read my code carefully enough. I want to keep the img tag and everything after the one with href. I think I just have to replace that dot with something. I have to see if /s/S means any number of any character. I've heard conflicting stuff about it.
Update... got my s stuff mixed up. Think I just need to add a /s modifier. Better yet, it sounds like I can use a module, but I've come this far, and of the code is right in front of me, I'll use it.
Second update... Problem solved. The s modifier after the i modifier worked!
| [reply] |
Oh! There's a line-break in there! I need the alternative to . that will match a line brake!
| [reply] |