mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 04:19:27 +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 $got_change;
|
||||
while($code =~ s/(\W)$from(\W)/$1$to$2/) {
|
||||
while($code =~ s/(\b)$from(\b)/$1$to$2/) {
|
||||
$got_change = 1;
|
||||
}
|
||||
return $got_change;
|
||||
|
Loading…
Reference in New Issue
Block a user