Re: counting the number of characters that were matched in a regular expression

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

At 2008-04-16 03:08PM, "" wrote:
Quoted text here. Click to load it

You want  s/(\d)(\d)/"x" x length($1) . $2/eg

Note the 'e' modifier

Glenn Jackman
  "If there is anything the nonconformist hates worse than a conformist,
   it's another nonconformist who doesn't conform to the prevailing
   standard of nonconformity." -- Bill Vaughan

Site Timeline