Scooby08 Posted August 21, 2010 Share Posted August 21, 2010 This is more of a curiosity question.. Could somebody tell me if there are any differences between the following.. They all seem to perform the same for me and I can't find any differences.. .?* (.?)* (.?*) I'm just using it like so: <title>.?*</title> Thanks.. Link to comment https://forums.phpfreaks.com/topic/211395-is-there-any-differences/ Share on other sites More sharing options...
sasa Posted August 21, 2010 Share Posted August 21, 2010 1st and 3rd are same (parse error) Link to comment https://forums.phpfreaks.com/topic/211395-is-there-any-differences/#findComment-1102205 Share on other sites More sharing options...
GoneNowBye Posted August 22, 2010 Share Posted August 22, 2010 they're all wrong .*? means least number of characters .* means most number of characters the ? operator makes Regex be lazy. make the smallest match it can ? by itself (not after a + or * or {}) means optional, may be there Link to comment https://forums.phpfreaks.com/topic/211395-is-there-any-differences/#findComment-1102392 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.