in reply to Regex exact pattern match problem!

I want this done by a regex and not for example a function that calculates the output.
Why this restriction?

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: Regex exact pattern match problem!
by Jts (Initiate) on Nov 24, 2008 at 08:05 UTC
    Hey CountZero,

    The reason I wanted to do this strictly by a regex was simply because I knew it was possible (and how to) in a normal loop.
    And as I am still in a very young age of learning Perl, I was trying to learn more about regex's.

    You guys gave alot of new insights of ways how to do this, thanks alot guys!

    Regards,
    Joris