[system] / trunk / pg / lib / Value / Context / Data.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Value/Context/Data.pm

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

Revision 2771 Revision 3333
59sub getPattern { 59sub getPattern {
60 shift; my $s = shift; 60 shift; my $s = shift;
61 foreach my $x (@_) {$x = protectRegexp($x)} 61 foreach my $x (@_) {$x = protectRegexp($x)}
62 my @pattern = (); 62 my @pattern = ();
63 push(@pattern,join('|',@_)) if scalar(@_) > 0; 63 push(@pattern,join('|',@_)) if scalar(@_) > 0;
64 push(@pattern,protectRegexp($s)) if length($s) ==1; 64 push(@pattern,protectRegexp($s)) if length($s) == 1;
65 push(@pattern,"[".protectChars($s)."]") if length($s) > 1; 65 push(@pattern,"[".protectChars($s)."]") if length($s) > 1;
66 my $pattern = join('|',@pattern); 66 my $pattern = join('|',@pattern);
67 $pattern = '^$' if $pattern eq ''; 67 $pattern = '^$' if $pattern eq '';
68 return $pattern; 68 return $pattern;
69} 69}

Legend:
Removed from v.2771  
changed lines
  Added in v.3333

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9