Jump to content

carpiediem

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

carpiediem's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Give this a shot. $price_range_expr = '/£(\d+)-£?(\d+)/'; $year_range_expr = '/([12]\d{3})-([12]\d{3})/'; Remember, if the query itself includes a year or price range, you'll run into trouble.
  2. This will match you example, but it will also accept numbers with as few as 6 digits or as many as 12. Hope it helps. /\+(?:\d{3,4}[-\s]?){2,3}/
  3. http://www.php.net/manual/en/datetime.format.php $date = new DateTime('2000-01-01'); echo $date->format('Y-m-d H:i:s');
  4. This returns a result: preg_match('/Results[\s\S]+?(?:<\/p)/', $this->rawText, $match); and this matches the same text (plus the remainer of the rawText string): preg_match('/Results[\s\S]+?/', $this->rawText, $match); But, this doesn't give me a match at all: preg_match('/Results[\s\S]+?(?:<\/p)?/', $this->rawText, $match); Why isn't the question mark at the end working the way I expect it to? Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.