the first ^ says start of 
        while 
        [^ ] - deals with a character class and since first says NOT space
  and with the + following says to continue capturing non spaces until a space occurs

Wags ;)
-----Original Message-----
From: Naveen Parmar [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 13:16
To: [EMAIL PROTECTED]
Subject: Pattern matching


What is the purpose of using [^"] in the following expression:

s/^([^ ]+) +([^ ]+)/$2 $1/;



_________________________________________________________________
Join the world's largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to