...

View Full Version : preg pattern question



JustinMs66
07-26-2007, 09:07 PM
say i have:
<input name="test1" id="test2" type="test3" />

but:
1) not all fields are required
2) they can be in any order.

i can easily make a pattern that matches them in that order,and i can add a "?" to the end of each to make it so that they arent required. but what about order? how do i make it so that the order dosn't matter.

so that like i can have it like:
<input type="test1" name="test2" />
or
<input id="test1" type="test3" id="test2" />

and it will still match

phill_ridout
07-26-2007, 09:51 PM
your attributes are screwed up check out http://www.w3schools.com/tags/tag_input.asp the name and id should be the same as in javascript, ie uses name and mozilla uses id! (I found out the hard way)

JustinMs66
07-26-2007, 10:04 PM
dude yes i completely made that up as an example!!! i am not actually using that.
now can someone please help me?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum