preg regular expression

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
radicalfix
Forum Newbie
Posts: 7
Joined: Mon Dec 04, 2006 10:49 pm

preg regular expression

Post by radicalfix »

How do I get the value between two strings, let say ?

example [url]http://www.php.net[/url], and get the result http://www.php.net using php preg reglar expression?

Thank you.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

moved to regex
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Typically it's similar to

Code: Select all

#left side(.*?)right side#
Post Reply