Last active
May 13, 2018 17:31
-
-
Save davidsaccavino/eb222febf37e22bf552346b2e3066d6f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import re, sys | |
i = 0 | |
message = '' | |
for elt in sys.argv: | |
if i > 0: | |
message += ' ' + elt | |
i += 1 | |
langRegex = re.compile(r'visual\s*basic|vb[asic]*?|visual\s*b[asic]?|v[isual]?\s*b[asic]?|javascript|js|java\s*?s[cript]?|php|perl') | |
langSub = langRegex.sub('python', message, flags=re.I) | |
print(langSub) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment