Re: ereg regexp problem



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
.



Relevant Pages

  • ereg regexp problem
    ... I have a problem of matching a dashin the code beolow. ... I am running PHP Version 5.0.5 on windows. ...
    (alt.php)
  • Re: English version of Papyrus X released
    ... I had removed all references ... > -> comment out the matching lines in the order form. ... Thanks Mark, for the suggestion. ... Brian White ...
    (comp.os.os2.apps)
  • Re: Emulation
    ... Windows being case-blind and the Unix server which needs ... matching case. ...
    (comp.sys.psion.misc)
  • MD5 hashes for FC2
    ... I am downloading and summing on Windows, but that shouldnt be an issue I ... guess...it seems the sums are out of order - eg: instead of matching the ...
    (Fedora)
  • Re: OT word of the day
    ... A pattern marking, usually shown as a darkened diamond or double ... for matching pieces. ... The mark may be made with any of the standard ...
    (rec.crafts.textiles.quilting)