GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   I need some XPath / RegExp help, particularly in relation to IE (https://gfy.com/showthread.php?t=871776)

StuartD 11-26-2008 09:57 AM

I need some XPath / RegExp help, particularly in relation to IE
 
Here's the basics... I have a word, say the word is "test".

What I want to be able to do is use javascript to navigate the DOM of the html document and find every instance of the word "test" but NOT if it's with in an img tag, or link or used anywhere that's not just standard text.

So for example:
<p>This is just a test</p> - find
<a href='#'>click test</a> - don't find
<img src="images/test.jpg"> - don't find

I am currently using XPath which is able to differentiate a "textNode" from everything else, and thus, give me the results I want.
But IE's piece of crap browser will not use XPath on anything but XML. And I need for this to work in HTML.

I figure my only alternative is to use RegExp but something of this magnitude is simply over my head.

Any help would be greatly appreciated.... either in this thread, or even by icq (563-6347)

StuartD 11-26-2008 12:47 PM

Thank you mrkris, you rock!
Your help is much appreciated, it now works like a charm :thumbsup

mrkris 11-26-2008 01:46 PM

Quote:

Originally Posted by StuartD (Post 15109238)
Thank you mrkris, you rock!
Your help is much appreciated, it now works like a charm :thumbsup

anytime!


All times are GMT -7. The time now is 02:59 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc