1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

2 questions on regular expressions-php;help me!

Discussion in 'PHP' started by mahesh15392, Apr 5, 2013.

  1. #1
    4. Regular expressions
    4.1. Data extracting (~ 5 minutes, ~ 5 SLOC)
    Input:
    ï‚· An example text:
    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.
    Output:
    ï‚· Output to the browser all numbers greater than 4 digits contained in the given input text using PHP.
    Guidelines
    ï‚· Use regular expressions
    ï‚· Of course, the output must work whatever is the text given as input
    4.2. Data replacing (~ 4 minutes, ~ 2 SLOC)
    Input:
    ï‚· The following text:
    During the day, Damien is working.
    Output:
    ï‚· From the given input, output the following text to the browser:
    Damien is happy to work.
    Guidelines
    ï‚· Use regular expressions functions only
    ï‚· No more than 2 lines of code expected. Bigger code will be rejected
     
    mahesh15392, Apr 5, 2013 IP