in reply to Re: Regex - remove characters (pattern not terminated)
in thread Regex - remove characters (pattern not terminated)
The output I would like to see is: temp = 0$temp = 1234567890; $pattern = 123; $temp =~ s/$pattern/*/i; print "temp = $temp";
Instead of creating a whole new variable to match the 321, is there a simpler way to reverse the $pattern variable explicitly in a regex?$temp = 4567890321; $pattern = 123;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regex - remove characters (pattern not terminated)
by almut (Canon) on Jun 28, 2010 at 20:39 UTC | |
|
Re^3: Regex - remove characters (pattern not terminated)
by JavaFan (Canon) on Jun 28, 2010 at 21:02 UTC | |
by twaddlac (Novice) on Jun 29, 2010 at 19:03 UTC |