You could something along these lines instead:
$post_message =~ s{\[\[([^]]+)\]\]}{process_match($1)}ge; sub process_match { my $tmp = shift; if ($DB->table('Articles')->count( { article_title => $tmp } ) > 0) + { # return modified text here } else { return $tmp; # unmodified text } }
In reply to Re: Regex keeps looping on itself :/
by moritz
in thread Regex keeps looping on itself :/
by ultranerds
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |