Lines 1024-1029
sub clean_search_term {
Link Here
|
1024 |
# screen all brackets with backslash |
1024 |
# screen all brackets with backslash |
1025 |
$term =~ s/(?<!\\)(?:[\\]{2})*([\{\}\[\]])$lookahead/\\$1/g; |
1025 |
$term =~ s/(?<!\\)(?:[\\]{2})*([\{\}\[\]])$lookahead/\\$1/g; |
1026 |
|
1026 |
|
|
|
1027 |
# remove problematic punctuation and escaped slashes surrounded by spaces if truncate |
1028 |
$term =~ s/\s+(\s*[&;,:\.=\-\/]|(\\\/)\s*)+\s$lookahead/ /g if $truncate; |
1029 |
|
1030 |
|
1027 |
# restore all regex contents after escaping brackets: |
1031 |
# restore all regex contents after escaping brackets: |
1028 |
for (my $i = 0; $i < @saved_regexes; $i++) { |
1032 |
for (my $i = 0; $i < @saved_regexes; $i++) { |
1029 |
$term =~ s/~~RE$i~~/$saved_regexes[$i]/; |
1033 |
$term =~ s/~~RE$i~~/$saved_regexes[$i]/; |
1030 |
- |
|
|