On Thu, Feb 9, 2012 at 1:15 AM, daedae11 <daeda...@126.com> wrote: > import re > re.match("^hello", "hello") > re.match("hello", "hello") > > Please give a string that matches RE "^hello" but does not match RE "hello", > or matches RE "hello" but does not match RE "^hello".
In addition to the other answers, it's important to note that nothing in these REs require it to be a "word". So both of the above will match the "hello" in "hellonwheels" for example. -- Brett Ritter / SwiftOne swift...@swiftone.org _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor