in reply to How regex works here?
In the first regex you are matching only the "B6y green" and you are replacing that again with "B6y green". So the $lines is same as it is
In the second regex you are matching "B6y green" and the remaining string and you are replacing that with "B6y green". So the $lines has only the matched pattern.
The great pleasure in my life is doing what people say you cannot do.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How regex works here?
by nagalenoj (Friar) on Apr 08, 2009 at 05:38 UTC | |
by bart (Canon) on Apr 08, 2009 at 09:01 UTC |