Hi Swami,
I want to replace a chunk many files
<div id="linklist">
# lots of other stuff here, many lines all inconsistent
across many files##
</html>
<div id="linklist">(.*?)</html>
<div id="linklist">(.*)</html>
isn't working... I suspect because of the many lines
issue and I am having trouble finding the answer to
how to get grep to ignore line endings?
I'm sure it's really simple, but even after looking thru
BBEdit's grep help I can't find it.
Good ol' Ken Ray once posted a code snippet that even iI could
understand and
I use it now all the time for extracting values from XML like files:
function getXMLdata theData, what
get matchText(theData,"(?s)<" & what & ">(.*?)</" & what &
">",retValue)
return retValue
end getXMLdata
This does only wok with fixed TAG names like:
-> theData = <oneTag>this and that and again this and that</oneTag>
-> get getXMLData theDAta,"oneTag"
Will return: his and that and again this and that
Maybe you can adapt this to your needs?
Like getting the desired string this way and then replace it with
another string?
You could change it this way two support two different TAGs
function getXMLdata theData, TagOne,TagTwo
get matchText(theData,"(?s)<" & TagOne & ">(.*?)</" & TagTwo &
">",retValue)
return retValue
end getXMLdata
Not tested, just an idea...
TIA
Sivakatirswami
www.himalayanacademy.com
Regards
Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution