Re: ereg regexp problem
- From: "J.O. Aho" <user@xxxxxxxxxxx>
- Date: Sun, 30 Sep 2007 17:52:42 +0200
rallykarro@xxxxxxxxxxx wrote:
Hi,
I have a problem of matching a dash(-) in the code beolow.
Why does not the below work when matching a dash(-) but all other
signs is correctly matched when trying?
$res = ereg("^[a-zA-Z\.\-\,\/\Å\å\Ä\ä\Ö\ö\Ü\ü\ß\é\æ\ø\Æ\Ø ]+$", "-");
I am running PHP Version 5.0.5 on windows.
$res = ereg("^[a-zA-Z\.\,\/ÅåÄäÖöÜüßéæøÆØ -]+$", "-");
The '-' should be last if it's to compared to, anywhere else it will be used
to mark a range.
--
//Aho
.
- References:
- ereg regexp problem
- From: rallykarro
- ereg regexp problem
- Prev by Date: Re: the usort 's puzzle
- Next by Date: Re: Determine if string is all uppercase?
- Previous by thread: ereg regexp problem
- Index(es):
Relevant Pages
|