jimt has asked for the wisdom of the Perl Monks concerning the following question:
I'd like to do two things, first of all, change all Y's horizontally between x's into x's themselves, and change all 4's vertically between Y's into Y's themselves. This is the result:xxxYYxxxYYxxx YY YY 4Y 4X 4Y 4Y YY YY
Now, the horizontal match to turn the Y's into x's is easy, just join on the line and do the regex as normal. But what's a nice, clever way to do the vertical match to turn the 4's into Y's? (don't worry about precedence compared to the horizontal match)xxxxxxxxxxxxx YY YY YY YX YY YY YY YY
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: vertical regex in a matrix?
by chromatic (Archbishop) on Sep 11, 2000 at 04:34 UTC | |
by little (Curate) on Sep 11, 2000 at 17:36 UTC | |
|
RE: vertical regex in a matrix?
by BooK (Curate) on Sep 11, 2000 at 18:36 UTC | |
|
Re: vertical regex in a matrix?
by japhy (Canon) on Sep 23, 2000 at 07:02 UTC | |
|
RE: vertical regex in a matrix?
by ncw (Friar) on Sep 12, 2000 at 00:41 UTC |