in reply to Regex to only show 2nd character of the same character in a string

my @chars = /.(.)/sg;

By any chance, are you trying to decode UTF-16 improperly? (Is every second character a NUL, "\0"?)

(I missed the "same character" bit.)

  • Comment on Re: Regex to only show 2nd character of the same character in a string
  • Download Code