Page 1 of 1

Rex Help

Posted: Wed Aug 17, 2005 4:10 pm
by KMandalia
I want to do something like COMMAND:query where command is a single word.

Constraints:

1) I need to start on the fist character of the whole query and go upto the first :. I take everything upto but not including the first : and save it in one variable and take everything after the first : and reassign it to $ query.

So this is essentially breaking up user's query at first : from left.

2) Once I have it, I think i will use the switch statement to match it up against set of pre-defined command (switch cases are case-sensitive right, so To<>TO?)

Rex Help

Posted: Wed Aug 17, 2005 4:14 pm
by mark
>>=[^:]+\F:
>>=[^:]*:\P?.*

Right switch is case sensitive. Use <lower> or <upper> before <switch> if you want to ignore case.

Rex Help

Posted: Wed Aug 17, 2005 4:39 pm
by KMandalia
Whoa.

You guys are super fast and great.