in reply to Re^3: replace a digit with another digit
in thread replace a digit with another digit
THANKS TO EVERYONE !!!! Kevin# s/(?<=[a-zA-Z])([12])/ $1 == 1 ? 2 : 1 /eg; # s/([a-z])([12])/ $1 . ($2 == 1 ? 2 : 1) /eig; s/(.)([12])/ $1 . ($2 == 1 ? 2 : 1) /eig; this might work: s/([A-Z])([12])/ $1 . ($2 == 1 ? 2 : 1) /eig;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: replace a digit with another digit
by davidrw (Prior) on Aug 18, 2005 at 14:24 UTC |