..but it keeps on looping over and over the same stuff (untl the script dies, or I kill the process in SSH) An example post is:# for tags like [[something]] while ($post_message =~ m%\[\[([^]]+)\]\]%gix) { if ($1 =~ /\|/) { next; } my $tmp = $1; my $val = $1; # print STDERR "\n\nFOO\n\n"; if ($DB->table('Articles')->count( { article_title => $tmp } ) > 0 +) { print TESTOUT "\n\nFOO 2 - gggg - $tmp \n\n"; my $article_id = $DB->table('Articles')->select( ['article_id' +], { article_title => $tmp } )->fetchrow; $tmp =~ tr{&[]ÀÂÄàâäÇçÉÊÈËéêèëÏÌÎïìîÖÔÒöôòÜÛÙüûùA-Z?!;«»()" }{ + aaaaaacceeeeeeeeiiiiiioooooouuuuuua-z _}; $tmp =~ s/ /_/g; $post_message =~ s/\Q[[$1]]/[[$article_id]]/sig; } else { ` # do something here latest } }
Can anyone suggest why it keeps doing this kinda stuff: FOO 2 - gggg - vieux Montréal FOO 2 - gggg - Montréal FOO 2 - gggg - vieux Montréal FOO 2 - gggg - 45 FOO 2 - gggg - vieux Montréal FOO 2 - gggg - 47 FOO 2 - gggg - vieux Montréal FOO 2 - gggg - 48 FOO 2 - gggg - vieux Montréal TIA! Andy==Introduction== A Montréal, il y a [[vieux Montréal]]. [[Montréal]] [[test]] ==Brief History== asdfasfd as df asf d asdf as fd asf dasfd ==Geography== ==Regions== ==Cities== ==Sights and Activites== ==Weather== ==Getting There== ==END Getting There==
In reply to Regex keeps looping on itself :/ by ultranerds
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |