Definition: *?
Back to the main index of this glossary
>>> import re
>>> y = re.split('(<.*>)', '<a href="http://www.some-url.com">some hyperlink</a>')
>>> print y
['', '<a href="http://www.some-url.com">some hyperlink</a>', '']
>>>
>>> y = re.split('(<.*?>)', '<a href="http://www.some-url.com">some hyperlink</a>')
>>> print y
['', '<a href="http://www.some-url.com">', 'some hyperlink', '</a>', '']
>>>
>>> y = re.split('(.,\s.*)', 'Home is the sailor, home from sea, and the hunter home from the hill.')
>>> print y
['Home is the sailo', 'r, home from sea, and the hunter home from the hill.', '']
>>> y = re.split('(.,\s.*?)', 'Home is the sailor, home from sea, and the hunter home from the hill.')
>>> print y
['Home is the sailo', 'r, ', 'home from se', 'a, ', 'and the hunter home from the hill.']
Back to the main index of this glossary

