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.
In reply to Re: How regex works here?
by lakshmananindia
in thread How regex works here?
by nagalenoj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |