Regular expressions - Difference between (.*?) and (.*)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
iBroughtCookies
Forum Newbie
Posts: 10
Joined: Wed Jun 24, 2009 12:09 pm

Regular expressions - Difference between (.*?) and (.*)

Post by iBroughtCookies »

What's the difference between (.*?) and (.*)
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Regular expressions - Difference between (.*?) and (.*)

Post by Benjamin »

0 or 1 of previous expression; also forces minimal matching when an expression might match several strings within a search string.
Post Reply