vinaynischal14k

addOrganization python

Dec 7th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. import re
  2. line = "CSIR-National Botanical Research Institute, Plant Transgenic Laboratory, U.P., India. Electronic address: [email protected]."
  3. match = re.search(r'/([A-Z][^\s,.]+[.]?\s[(]?)*(Hospital|University|Institute|Law School|School of|Academy)[^,\d]*(?=,|\d)/', line)
  4. print(match.group(0))
Add Comment
Please, Sign In to add comment