regular expressions in a string?

From: dev (NOSPAMDONALDDUCKVOIDEMAIL_at_hotmail.com)
Date: 03/29/04


Date: Mon, 29 Mar 2004 16:58:41 +0200

Hey all,

i want a string only to contain
alpha-character : a-zA-Z but also ü etc and OR in combination with
(\.|\-|\') is for this a good ereg? :(

this doesnt work
if(ereg("/[\w]|([\w]+(\.|\'|\-))*/", $value)===false)return "error";
i am not so good with ereg thingy's :)

Thnks for the help,

Cheers,
Dev



Relevant Pages

  • Re: ereg_replace hangs script execution
    ... it;) Maybe there is some variable name conflict, or the string is ... encoded in some strange way (unacceptable for ereg and preg). ...
    (comp.lang.php)
  • Re: ereg_replace hangs script execution
    ... it;) Maybe there is some variable name conflict, or the string is ... encoded in some strange way (unacceptable for ereg and preg). ...
    (comp.lang.php)
  • Re: Finding @ in a string, and other items
    ... wiadomosci news:HQXVb.9637$se3.4553@fe1.columbus.rr.com... ... > Also - how would I find any non alpha numeric characters in a string so I ...
    (comp.lang.php)
  • Re: testing string for substring
    ... Ereg is doing regular expression matches, ... putting a variable in quotes is another big performance hit - ... essentially you're forcing PHP to make a string that has ...
    (comp.lang.php)
  • Re: php - string characters
    ... In article, Richard Watson wrote: ... bad string! ... Never really did ever work out why php needs preg and ereg. ...
    (uk.net.web.authoring)