mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Use boundaries instead of \W
This commit is contained in:
parent
629d1c7286
commit
525588b8f1
@ -175,7 +175,7 @@ while($subcode =~ m/^\s*(and)?\s*replace\s*'.*'\s*with\s*'.*'/i) {
|
|||||||
|
|
||||||
my $ret = eval {
|
my $ret = eval {
|
||||||
my $got_change;
|
my $got_change;
|
||||||
while($code =~ s/(\W)$from(\W)/$1$to$2/) {
|
while($code =~ s/(\b)$from(\b)/$1$to$2/) {
|
||||||
$got_change = 1;
|
$got_change = 1;
|
||||||
}
|
}
|
||||||
return $got_change;
|
return $got_change;
|
||||||
|
Loading…
Reference in New Issue
Block a user