mirror of
https://github.com/perlbot/perlbuut
synced 2025-06-08 12:55:40 -04:00
fixing bug in factoid replacement regex
This commit is contained in:
parent
9b0474842f
commit
d5e7bf107b
1 changed files with 2 additions and 2 deletions
|
@ -126,7 +126,7 @@ sub command {
|
|||
#i lost the object oriented calling here, but i don't care too much, BECAUSE this avoids using strings for the calling, i might change that.
|
||||
$fact_string = $commandhash{$1}->($self,$subject, $said->{name}, $said);
|
||||
}
|
||||
elsif ($subject =~ m|^\s*(.*?)\s*=~\s*s/([^/]+)/([^/]+)/([gi]*)|i)
|
||||
elsif ($subject =~ m|^\s*(.*?)\s*=~\s*s/([^/]+)/([^/]*)/([gi]*)|i)
|
||||
{
|
||||
$fact_string = $self->get_fact_substitute( $subject, $said->{name}, $said);
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ sub _fact_substitute
|
|||
sub get_fact_substitute {
|
||||
my( $self, $subject, $name, $said ) = @_;
|
||||
|
||||
if ($said->{body} =~ m|^(?:\s*substitute)?\s*(.*?)\s*=~\s*s/([^/]+)/([^/]+)/([gi]*)\s*$|i)
|
||||
if ($said->{body} =~ m|^(?:\s*substitute)?\s*(.*?)\s*=~\s*s/([^/]+)/([^/]*)/([gi]*)\s*$|i)
|
||||
{
|
||||
my ($subject, $match, $subst, $flags) = ($1, $2, $3, $4);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue