REGEX Whitespaces

Discussion in 'PHP' started by SEOAnalytic.com, Oct 29, 2008.

  1. #1
    Do i need to explain whitespaces in a regex pattern? If yes how to i do that?
    Suppose
    $str="some text goes here";
    if i use regex /some (.*) (.*) here/is it wont return any result.
     
    SEOAnalytic.com, Oct 29, 2008 IP
  2. keyaa

    keyaa Peon

    Messages:
    137
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    \s matches whitespaces, such as spaces, tabs, and also newlines and carriage returns.
     
    keyaa, Oct 29, 2008 IP