On 19 Aug 2003, Wade wrote:

> so the line: if ($text =~ /User Connect (.*?)\ /
> Would watch for "User Connect" text and strip everything after the nick.
> Leaving me with just a nick to parse.

Do you want case insensitive matching?  If your file has Mark, and you 
want to match mark, put an i at the end of your regexp.  And you shouldn't 
need to escape the whitespace.  Try

if ($user =~ /$pat/i) {
and
if ($text =~ /User Connect (.*?) /)

> From there it needs to be compared to my file for a match or partial
> match. This is where my headache beings.

Try it with just alphanum characters first... all the * and [ ] characters 
maybe giving your regexp problems.

Also you are loading the whole file for each connection.  If the bot runs 
all the time, you could probably load the file once?

ray
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Ray DeJean                                       http://www.r-a-y.org
Systems Engineer                    Southeastern Louisiana University
IBM Certified Specialist              AIX Administration, AIX Support
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Reply via email to