Loading ...
Sorry, an error occurred while loading the content.

Regex puzzler

Expand Messages
  • hooyar66
    #! perl use strict; use warnings; use diagnostics; my $text = A ver~sion, of 5 6 NJH s SD card which enables the PCB itself to be plug ged (directly)
    Message 1 of 1 , Jan 30, 2007
    • 0 Attachment
      #! perl
      use strict;
      use warnings;
      use diagnostics;

      my $text = 'A ver~sion, of 5 6 NJH\'s SD card \'which\' enables the
      PCB itself to be plug\'ged (directly) i@nto a #,standard SD card
      input connector';

      $text =~ s/(\s+)/zxz/g;
      $text =~ s/(\W+)/\\$1/g;
      $text =~ s/(zxz)/ /g;

      print $text;
    Your message has been successfully submitted and would be delivered to recipients shortly.