Created
April 22, 2020 06:18
-
-
Save StephenVinouze/b203141d3eaeb75dad4e742999d2ca21 to your computer and use it in GitHub Desktop.
Script to count word between two separators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
inputString = """ | |
""" | |
list = re.findall(r'\[\<(.+?)\>\]', inputString) | |
subString = " ".join(list).replace('\xc2\xa0', ' ') | |
count = len(subString.split()) | |
print count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment