I want a simple validation <word must be Locate with length 6,SPACE,1 length integer,COMMA, 1 length integer,COMMA, 1 word must be either UP, DOWN, LEFT, RIGHT>
and case of words don't matter. How would I do this? Preferably I'd like to do this using RegExp and I'll have an array of strings.
i.e.) LOCaTe 9,0,uP
I have a simple array ["Locate", "9", "," ,"4", "up"] . This array will work. If I have an array like ["Locate"," asdf", "9", "," ,"4", "up"] that array wont work. It has to be a string then number then comma then number then string.