User loginNavigationSearch |
I'm new to writing regular expressions. Please HelpConsider a thumbnail src locations Consider a thumbnail link locations of the bigger image now please tell me a pattern and a template which will match both of them |
Re: I'm new to writing regular expressions. Please Help
So pages you want to download from are these:
http://www.ethnic-gallery.com/africa/Senegal/index2.htm
http://www.ethnic-gallery.com/america/achomawi/
Here's how I created the script for them:
As a result I got:
That's a working script for that first page. To get it working on the America page also:
\wmatches a letter, number and underscore, and\w+matches a one or more of them. The existing matcher had also a dash, which\wdoesn't match, so we use a set of characters.[-\w]+matches one or more dash, letter, number and underscore.Result:
That scripts works on both pages. And if you come across page in ethnic-gallery.com where that script doesn't work, just open up Script Wizard and tweak the regular expressions.
Here are some links to help you with regular expressions:
http://thumbsdown.mozdev.org/regexp.html#introduction
http://www.regular-expressions.info/
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Globa...
I hope that helps. I suggest you try to create the script by yourself as I did in the above and not just copy the final script. You learn more about how ThumbsDown and regular expressions work. Ask if you have problems.