Hi list,

I read through the manual and tried to find something on google, but I
didn't come to anything useful.

It seems that the ereg()-family (I tried ereg(), eregi() and ereg_replace())
can't recognize any special characters such as θικλ etc. I tested this :

<?php
print
(ereg("[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:pri
nt:][:punct:][:space:][:upper:][:xdigit:]]","ι"));
?>

and it returned a blank screen. When I fill in a regular character such as
'e' or a slash or whatever, it returns 1. I ran into this when I tested a
script which should replace '{PMID[PubMed ID number]:[First author's name]}
into a link to the article online. For instance, "{PMID12632325:Flanigan}"
results in "<A
href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&amp;db=PubM
ed&amp;dopt=Abstract&amp;list_uids=12632325" target="_blank">Flanigan</A>".

This worked all fine, until an author's name was Mόller. Then my
ereg_replace() failed (below). Any ideas?

<?php
$val = ereg_replace("{PMID([[:alnum:]. _-]*):([[:alnum:]. _-]*)}", "<A
href=\"http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&amp;db=Pub
Med&amp;dopt=Abstract&amp;list_uids=\\1\"
target=\"_blank\">\\2</A>","{PMID11519736:Mόller}");
print ($val);
?>

TIA!

--
[Win2000 | Apache/1.3.23]
[PHP/4.2.3 | MySQL/3.23.53]

Ivo Fokkema
PHP & MySQL programmer
Leiden University Medical Centre
Netherlands



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to