Petr, I presume you mean [:alnum:] ie alphanumeric. I'm not able to demonstrate a difference between how preg and ereg that that symbol. I've attached a php file (regextest.php) that demonstrates that both ereg and preg appear to treat it the same. Am I missing something?
I count 21 instances of [:alnum:] in Moodle 2.0 not counting those within third party libraries.
/mod/wiki/diff/diff_nwiki.php 1 instance in _split($lines). Doesnt appear to be covered by any unit tests.
/question/format/webct/format.php 4 instances all in qformat_webct_convert_formula($formula). Doesnt seem to be covered by any unit tests.
/repository/url/lib.php (1 instance) in analyse_page($baseurl, $content, &$list) and the regex pattern doesn't even seem to be being used at all.
/lib/wiki_to_markdown.php (16 instances)
Probably the absolute best thing to do would be for the people responsible for each of those files/areas to write unit tests exercising the regexs to define what the correct behaviour is in that context. I can write the tests if need be but it would be handy for someone who knows what "correct" is to define it. Then the regexs can then be modified if necessary to conform to the defined correct behaviour.
Just for easy reference:
http://www.php.net/manual/en/function.ereg-replace.php
http://www.php.net/manual/en/function.eregi-replace.php
http://www.php.net/manual/en/function.preg-replace.php
Peace - Anthony
p.s. - We should probably look at all of the ereg related functions (ereg, eregi, split, etc.) in fact here is a list of all the deprecated 5.3.0 functions - http://php.net/manual/en/migration53.deprecated.php