Notice the ?... The ? after the * is at least supposed to stop that
problem... So preg_replace("#\{(.*?),(.*?)\}#","\\2",$whatever); should do what you want...
:p
--
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
"Ivo Fokkema" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTEC
* Thus wrote Ivo Fokkema ([EMAIL PROTECTED]):
> Well d*mn, why didn't I think of this... It seems to work now! Thanks!
>
> I'm not such an expert on the Perl compatible regexp's so I rarely use
> them... Yet another reason to start using them though...
Its a good thing to learn perl regular expre
Well, I tried that first, but it failed when some user whould list multiple
references. The ereg_replace would then take the two references as one.
"{PMID11519736:Müller}, {PMID8789442:Milasin}" would result in a link to
Müller named "Müller}, {PMID8789442:Milasin" instead of two separate
links...
Also... You know, there's a (.*?) command as well.. Might work just about
perfect in your situation...
--
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
"Ivo Fokkema" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Well d*mn, why didn't I think of this... It seems to
What? Did it seriously help?
You might be intrested in this regex then:
preg_replace("#[a-z0-9\-\._îÎèéüÜÉÈáàÁÀäÄåÅöÖ]+#i",'',$VARIABLE);
// Should hit most chars you want...
--
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
"Ivo Fokkema" <[EMAIL PROTECTED]> skrev i meddelandet
news:
Well d*mn, why didn't I think of this... It seems to work now! Thanks!
I'm not such an expert on the Perl compatible regexp's so I rarely use
them... Yet another reason to start using them though...
Thanx!
"Dvdmandt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Use preg_*() func
6 matches
Mail list logo