I once wrote a website (http://regexone.com) to help people learn regular expressions using practical examples -- maybe you would like to give that a try and see if it helps you in understanding the different regexes a bit more?
By the way, could someone explain this to me - do regexes match a string if a part of a string matches the regex, or if the whole string does?
For example, this regex "([+|-]* )(\d+[,|.]* )(\d+)(\.)?(e)?(\d+)" (intended to match decimal/scientific numbers - see http://regexone.com/example/0) matches "720p" on regexone, but fails to match on debuggex. So it seems like it varies depending on some configuration - is that right?
As for your question, it generally depends how they're called - eg. in Python's re module, whether you call search() or match(). You can force a regex to match the entire string by adding ^ and $.
Seriously thank you.