DonationCoder.com Software > Find And Run Robot
[Solved] Multiple parameters to URL?
Ath:
Should be \w* instead of .* within the round braces
wjamoe:
if you define alias trigger (if you leave out the colon you should also leave it out of the regex)
car make model:year
and define regex as car at the beginning of the line followed by two words separated by a single space followed by a colon and a third word
^car (.*) (.*):(.*)
results where $$1 substitues the first word matching (.*)
http://www.car.com/?make=$$1&model=$$2&year=$$3
or alternatively from your original request:
http://www.car.com/q=$$1+$$2%3a$$3
when you type
car ford fusion:2009
it turns into
http://www.car.com/?make=ford&model=fusion&year=2009
or when you use the alternative
http://www.car.com/q=ford+fusion%3a2009
(BTW www.car.com does not work with these paramaters?)
Ath:
^car (.*) (.*):(.*)
results where $$1 substitues the first word matching (.*)
-wjamoe (November 05, 2013, 12:46 AM)
--- End quote ---
This only works when typing exactly 1 space after the first word.
A more reliable regex for capturing separate words, independent from the number of spaces, would be:
--- ---^car (\w*)\s*(\w*)\s*:?\s*(\w*)This way you can even have 0 or more spaces around the colon.
vbmark:
(BTW www.car.com does not work with these paramaters?)
-wjamoe (November 05, 2013, 12:46 AM)
--- End quote ---
That domain was just an example.
A more reliable regex for capturing separate words, independent from the number of spaces, would be:
--- ---^car (\w*)\s*(\w*)\s*:?\s*(\w*)This way you can even have 0 or more spaces around the colon.
-Ath (November 05, 2013, 01:40 AM)
--- End quote ---
Good stuff! Thanks!
Navigation
[0] Message Index
[*] Previous page
Go to full version