import re; text = " The Battle of Barnet (14 April 1471) during the Wars of the Roses, followed by the Battle of Tewkesbury, secured the throne for Edward IV of England and launched fourteen years of Yorkist rule.\n ENGLAND: Near Barnet, then a small Hertfordshire town north of London, Edward led the House of York against Richard Neville, 16th Earl of Warwick, and the House of Lancaster, which backed Henry VI for the throne. The battle began in a thick fog at dawn. While the main forces struggled, John de Vere, 13th Earl of Oxford, and his Lancastrian troops routed the Yorkists under Lord William Hastings, chasing them up to Barnet."; p = re.compile("\n\s*(\w+):"); m = p.search(text); print m.group(1);
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question