Here's one way:
#! perl -sw use strict; s[(?:\S+ ){2}\K((.).(..))][$2Y$3 $1], print while <DATA>; =output C:\test>junk56 col1 col2 cYl3 col3 col4 col5 1234 5678 9Y12 9012 3456 7890 =cut __DATA__ col1 col2 col3 col4 col5 1234 5678 9012 3456 7890
In reply to Re: Search patern within pattern in a single substitute command
by BrowserUk
in thread Search patern within pattern in a single substitute command
by shobhit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |