It's one thing to want a specific solution, it's another not to know that there is a simpler solution. In this case I'd have to guess that the OP isn't aware that regex simply isn't necessary, so just because they say they "want regex" doesn't mean they *actually* "want regex". I would highly recommend using a simple $gettok over a complex $regex in this situation- it's not only hundreds of times more efficient but it's easier to use and maintain.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"