The easiest way to learn RegExs, IMO, is with a realtime RegEx checker, such as: http://www.cuneytyilmaz.com/prog/jrx/
I've seen a better one with highlighting but I can't find it in my bookmarks at the moment. Charles On Aug 16, 10:09 am, Stephan Beal <[EMAIL PROTECTED]> wrote: > On Aug 16, 7:04 pm, Bernd Matzner <[EMAIL PROTECTED]> > wrote: > > > <a href="index.html">A</a> | <a href="/index.html">B</a> | <a > > href="http://localhost/index.html">C</a> | <a href="index.html? > > sdsdg=sdg">D</a> > > Doh, of course i hadn't considered that the navigation links > themselves having GET options (i was thinking about people passing in > args from external links). You're right - i think a solution like > yours is the only real way of handling that case. None of my sites use > GET parameters in their navigation links, so i'm going to punt on that > problem. But your approach is the most generic solution, it would > seem. > > > As for the each() function - I'm sure the if clause could be made into > > a regex, which, unfortunately, is not my forté - that's why I wrote > > "plain and stupid" ;-) > > Regexes are definitely worth learning. Once you know them, you can use > them in many different programming languages (and even non-programming > tools) and you'll be SO happy that you know how to use them. They are > without a doubt one of the pieces of knowledge with the highest > "return on invested time" of anything i've every learned. Hardly a day > goes by that i don't use them for some programming task or other. > > :)