Code Search for Developers
 
 
  

subexp.pl from AlphaMail at Krugle


Show subexp.pl syntax highlighted

#!/usr/bin/perl

$as = 'a sam <asam@gmail.com>, a, b <b@b.b>, b';
$as2 = 'a, sam <sam@gmail.com>, b';
$as3 = 'b, sam <sam@gmail.com>';

# Can anchors (^ and $) be in subexpressions?
$as =~ s/(^|,\s*)(a|b)(\s*,|$)/$1X$3/g;
$as2 =~ s/(^|,\s*)(a|b)(\s*,|$)/$1X$3/g;
$as3 =~ s/(^|,\s*)(a|b)(\s*,|$)/$1X$3/g;

print $as. "\n";
print $as2. "\n";
print $as3. "\n";

# Yep!




See more files for this project here

AlphaMail

AlphaMail is an accelerated web mail interface with a C++ middleware layer that is more effective than an IMAP proxy which is a highly scalable (10k+ users). The interface includes modern features, Section 508 compliance, and universal browser support.

Project homepage: http://sourceforge.net/projects/alphamail
Programming language(s): C++,Java,JavaScript,Perl
License: other

  html_purify.pl
  imap.pl
  imap_cache_test.pl
  ispell.pl
  middleware_test.pl
  mime.pl
  subexp.pl
  test.html