3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-29 23:39:24 +01:00

Separate search terms with whitespace glob instead of dot

This commit is contained in:
Pragmatic Software 2010-05-02 07:57:27 +00:00
parent e1e8418e02
commit 25c9c5f868

View File

@ -86,7 +86,7 @@ if($list_only) {
$result = "Sections containing '$search':\n "; $result = "Sections containing '$search':\n ";
} }
$search =~ s/\s/./g; $search =~ s/\s/\\s+/g;
while($text =~ m/^\s{4,6}(\d+\.[0-9\.]*)/msg) { while($text =~ m/^\s{4,6}(\d+\.[0-9\.]*)/msg) {
$this_section = $1; $this_section = $1;
@ -179,7 +179,7 @@ while($text =~ m/^\s{4,6}(\d+\.[0-9\.]*)/msg) {
} }
if(not $found and $comma eq "") { if(not $found and $comma eq "") {
$search =~ s/\./ /g; $search =~ s/\\s\+/ /g;
if($section_specified) { if($section_specified) {
print "No such text '$search' found within section '$section' in n1256.\n" if length $search; print "No such text '$search' found within section '$section' in n1256.\n" if length $search;
print "No such section '$section' in n1256.\n" if not length $search; print "No such section '$section' in n1256.\n" if not length $search;