in reply to Transposition of each letter pair in string
Here's a Perl regexical way: s/(.)(.)/$2$1/g;
Update: If you must exchange them one by one to percolate the first character over to the last, I won't help. I'd just say: s/(.)(.*)/$2$1/; That's fairly close to my original.
Update2: What you say doesn't describe what you have. Nevermind, I'll let the psychics figure it out.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Transposition of each letter pair in string
by sauoq (Abbot) on Dec 27, 2002 at 05:00 UTC |