From: Neowulf Date: 2005-12-23T22:17:50+09:00 Subject: Quick Regex Query Hi all, Really quick one for the regex gurus... Anyone know of a regex string which will extract out the stuff between "from" and "not" without the spaces between? User root from toronto-hs-216-138-233-211.s-ip.magma.ca not allowed because not listed in AllowUsers I've found something which *almost* does the job... \bfrom\W+(?:\w+\W+){1,6}not\b This is limited however, as I can't know for certain how many "words" will make up the hostname. I've got a non-regex solution already, but you don't want to know how that one works... .... something to do with using split and relying on the fact that the host name field always end up at the same index. Seems more than a little clunky. Any advise appreciated. Cheers ~Neowulf