SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    regular expression

    $x="On February 13, 2009, at exactly 23:31:30 (UTC) the decimal representation of Unix time was equal to 1234567890. Parties and other celebrations were held around the world, among various technical subcultures, to celebrate this day."

    need Output as

    Output to the browser all numbers greater than 4 digits contained in the given input text using PHP.

    Use only regular expressions

    please help!!!!

  2. #2
    SitePoint Guru aamonkey's Avatar
    Join Date
    Sep 2004
    Location
    kansas
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    homework question?
    aaron-fisher.com - PHP articles and more

  3. #3
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bulls eye

  4. #4
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,104
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Try using this Cheat Sheets - Added Bytes by Dave Child and look for the regex. I have it printed out and by my desk at all times.
    What I lack in acuracy I make up for in misteaks

  5. #5
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @lorenw --- thanks for trying to help...

    thought that it is place where we get help regardless whether it is for homework or development.. i came here to get some help but surprised to see the response i got....really sad...

    in only figured out my problem...

    preg_match_all('/[^0-4a-zA-Z\s\.\:\;\,\(\)]/', $e,$r);
    var_dump($r);

    am not sure how far it s good..but t works for me...

    @aamonkey....dont try to be a monkey...be human and try to help others wen neded....

  6. #6
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    73 Post(s)
    Tagged
    0 Thread(s)
    If we give you the answers, and you just regurgitate them for a grade, you havent learnt anything.

  7. #7
    SitePoint Member
    Join Date
    Mar 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @jeethuthomas pls send me the answers what ever you know in that questions..
    it would be helpful to me a lot...
    kindly plz do me the needful


Bookmarks

Posting Permissions

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