/[webpac2]/trunk/lib/WebPAC/Input.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/WebPAC/Input.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 774 by dpavlin, Fri Nov 3 20:56:21 2006 UTC revision 784 by dpavlin, Wed Dec 6 23:43:45 2006 UTC
# Line 566  Generate hash with regexpes to be applie Line 566  Generate hash with regexpes to be applie
566    
567  sub _get_regex {  sub _get_regex {
568          my ($sf,$from,$to) = @_;          my ($sf,$from,$to) = @_;
569            if ($from =~ m/^regex:(.+)$/) {
570                    $from = $1;
571            } else {
572                    $from = '\Q' . $from . '\E';
573            }
574          if ($sf =~ /^\^/) {          if ($sf =~ /^\^/) {
575                  return                  return
576                          's/\Q'. $sf .'\E([^\^]*?)\Q'. $from .'\E([^\^]*?)/'. $sf .'$1'. $to .'$2/';                          's/\Q'. $sf .'\E([^\^]*?)'. $from .'([^\^]*?)/'. $sf .'$1'. $to .'$2/';
577          } else {          } else {
578                  return                  return
579                          's/\Q'. $from .'\E/'. $to .'/g';                          's/'. $from .'/'. $to .'/g';
580          }          }
581  }  }
582    

Legend:
Removed from v.774  
changed lines
  Added in v.784

  ViewVC Help
Powered by ViewVC 1.1.26