in reply to Re: Search patern within pattern in a single substitute command
in thread Search patern within pattern in a single substitute command
W/o \K the following works too, but I would like to understand \Kcol2 cYl2 col3 col4 col5 5678 5Y78 9012 3456 7890
This is something I would have written if I had thought about the nested pattern in the first place....s[(.{5})((.).(..))(.*)][$1$2 $3Y$4$5], print while <DATA>;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Search patern within pattern in a single substitute command
by BrowserUk (Patriarch) on Mar 04, 2011 at 05:24 UTC | |
by shobhit (Sexton) on Mar 04, 2011 at 05:40 UTC |