in reply to Re^6: Reliable way to detect base64 encoded strings
in thread Reliable way to detect base64 encoded strings

Oops, mine wasn't valid Perl either! I used an unescape "/" in the pattern. Two solutions: escape it, or change the delimiter. I corrected the original post.
  • Comment on Re^7: Reliable way to detect base64 encoded strings

Replies are listed 'Best First'.
Re^8: Reliable way to detect base64 encoded strings
by Anonymous Monk on Apr 30, 2010 at 19:10 UTC
    None of the above code works for me?? I have been trying different regex's to find Base64's on webpages and then decrypt them. The above code doesnt even look like perl..more like php?? Is it a cgi code or something because ive yet to see perl in that type of format?? I know very little cgi at the moment. Im making my way through all the perl modules now and trying them out in scripts

      None of the above code works for me??

      There's no reason it shouldn't. I suspect your error is elsewhere. Provide a minimal runnable example and tell us how it doesn't work.

      The above code doesnt even look like perl..more like php??

      Similarity is to be expected since PHP is based on Perl, but it doesn't look anything like PHP. The PHP equivalent of my

      m{...}
      would be
      preg_match('{...}', $_)

      (I don't actually know PHP. That's based on a quick search.)