Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By Dormilich

Thread: ereg depreciated???

  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Posts
    456
    Thanks
    0
    Thanked 20 Times in 20 Posts

    ereg depreciated???

    if ereg() is depreciated then what can i replace this with:
    (!ereg("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,6})$",strtolower($value))
    NO Limits!! DHCreationStation.com
    ------------------------------------------------------------
    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com
    Global Complaint Dept.

  • #2
    Regular Coder
    Join Date
    Sep 2011
    Posts
    416
    Thanks
    18
    Thanked 26 Times in 26 Posts
    preg_match(); I believe
    If I've helped you out, show your appreciation by clicking the "Thanks" link as well as a link below!

    AdFly
    Facebook | Twitter
    Google | YouTube

  • #3
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,280
    Thanks
    12
    Thanked 342 Times in 338 Posts
    Code:
    filter_var($value, FILTER_VALIDATE_EMAIL);
    Strider64 likes this.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • Users who have thanked Dormilich for this post:

    aliqui (05-26-2014)

  • #4
    New Coder
    Join Date
    May 2012
    Location
    Oregon, USA
    Posts
    16
    Thanks
    1
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Dormilich View Post
    Code:
    filter_var($value, FILTER_VALIDATE_EMAIL);
    I know I'm late to the party, but I just wanted to elaborate on this last post. When I first saw it, my reaction was, what the hell does that mean. I'm still new to programming, and filter validations are not something that have been taught to me in school thus far. Preg_match is what they have taught us. So, for anyone else who reacts the way I did when seeing the response, here's a link.

    PHP: Validate filters - Manual

    Thanks Dormilich, I learned something today! I will say though, while your answer to his question was dead on, it wasn't clear what you were saying for those of us that haven't ever seen a filter.
    Last edited by aliqui; 05-26-2014 at 06:25 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •