Is it clever to use word boundary here? "/b"? Nicke
________________________________ From: John Legg [mailto:[EMAIL PROTECTED] Sent: den 18 augusti 2004 18:02 To: "Nicklas Bondesson" Cc: [EMAIL PROTECTED] Subject: Re: [PHP] preg_match question Try using a pattern set to the following: $pattern = "/^www.test.com$/"; and refer to: http://uk.php.net/manual/en/reference.pcre.pattern.syntax.php Rgds John --- Hello, How do I find an exact match of a string with preg_match? Example: String1: www.test.com/ String2: www.test.com/somepage.php?param1=true How do you write the regexp to only return String1 and not String2 when you match against "www.test.com" ?? Thanks in advance. Nicke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php