>>>>> "Scott" == Scott Batchelor <Batchelor> writes:

    Scott> $pair=~m/([^=]+)=(.*)/)

    Scott> This basically says start at the beginning of the string and
    Scott> match any "=" all the way to the end of the string...right?

No, I'm afraid not.

You can get an English explanation of a regexp with Japhy's excellent
YAPE::Regex::Explain module.  Here's the output for your code:

NODE                     EXPLANATION
----------------------------------------------------------------------
  /                        '/'
----------------------------------------------------------------------
  (                        group and capture to \1:
----------------------------------------------------------------------
    [^=]+                    any character except: '=' (1 or more
                             times (matching the most amount
                             possible))
----------------------------------------------------------------------
  )                        end of \1
----------------------------------------------------------------------
  =                        '='
----------------------------------------------------------------------
  (                        group and capture to \2:
----------------------------------------------------------------------
    .*                       any character except \n (0 or more times
                             (matching the most amount possible))
----------------------------------------------------------------------
  )                        end of \2
----------------------------------------------------------------------
  /                        '/'
----------------------------------------------------------------------
)                        end of grouping
----------------------------------------------------------------------
void:chris~

Hope this helps,

- Chris.
-- 
$a="printf.net"; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
"Never go in against a Sicilian when _death_ is on the line!" - Vizzini


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

Reply via email to