diff --git a/C++/.gitignore b/C++/.gitignore index d6b7ef3..f935021 100644 --- a/C++/.gitignore +++ b/C++/.gitignore @@ -1,2 +1 @@ -* !.gitignore diff --git a/C/.gitignore b/C/.gitignore index d6b7ef3..f935021 100644 --- a/C/.gitignore +++ b/C/.gitignore @@ -1,2 +1 @@ -* !.gitignore diff --git a/C/hello.c - Shortcut.lnk b/C/hello.c - Shortcut.lnk new file mode 100644 index 0000000..0c0e79b Binary files /dev/null and b/C/hello.c - Shortcut.lnk differ diff --git a/HTML/.gitignore b/HTML/.gitignore index d6b7ef3..f935021 100644 --- a/HTML/.gitignore +++ b/HTML/.gitignore @@ -1,2 +1 @@ -* !.gitignore diff --git a/HTML/194509.html b/HTML/194509.html new file mode 100644 index 0000000..34187a9 --- /dev/null +++ b/HTML/194509.html @@ -0,0 +1,6 @@ + +194509 + +Hello World + + \ No newline at end of file diff --git a/HTML/file.html b/HTML/file.html new file mode 100644 index 0000000..3fd9b78 --- /dev/null +++ b/HTML/file.html @@ -0,0 +1,8 @@ + + + +Open Source + +Open source software is a free liberal software . It is available with source code and it is easy to distribute. + + \ No newline at end of file diff --git a/HTML/mca.htm b/HTML/mca.htm new file mode 100644 index 0000000..80428c3 --- /dev/null +++ b/HTML/mca.htm @@ -0,0 +1,5 @@ + + +

HEY WORLD

+ + \ No newline at end of file diff --git a/Java/.gitignore b/Java/.gitignore index d6b7ef3..f935021 100644 --- a/Java/.gitignore +++ b/Java/.gitignore @@ -1,2 +1 @@ -* !.gitignore diff --git a/JavaScript/.gitignore b/JavaScript/.gitignore index d6b7ef3..f935021 100644 --- a/JavaScript/.gitignore +++ b/JavaScript/.gitignore @@ -1,2 +1 @@ -* !.gitignore diff --git a/Python/.gitignore b/Python/.gitignore index d6b7ef3..f935021 100644 --- a/Python/.gitignore +++ b/Python/.gitignore @@ -1,2 +1 @@ -* !.gitignore diff --git a/Python/194509.py b/Python/194509.py new file mode 100644 index 0000000..086b181 --- /dev/null +++ b/Python/194509.py @@ -0,0 +1,46 @@ +import re, pyperclip + +phoneRegex = re.compile(r''' + (\d{3} | (\(\d{3}\)))? + (\s|-|\.)? + (\d{3}) + (\s|-|\.) + (\d{4}) + (\s*(ext|x|ext.)\s*(\d{2,5}))? + ''',re.VERBOSE) + +emailRegex = re.compile(r'''( + [a-zA-Z0-9._%+-]+ + @ + [a-zA-Z]{2,8} + (\.[a-zA-Z]{2,4}) + )''',re.VERBOSE) + +text = str(pyperclip.paste()) + +matches = [] + +for groups in phoneRegex.findall(text): + if groups[0]!='': + phoneNum = '-'.join([groups[0],groups[3],groups[5]]) + else: + phoneNum = '-'.join([groups[3],groups[5]]) + + if groups[8] != '': + phoneNum += ' x'+groups[8] + + matches.append(phoneNum) + +for groups in emailRegex.findall(text): + email = groups[0] + matches.append(email) + +if len(matches)>0: + pyperclip.copy('\n'.join(matches)) + print('coppied to clipboard:') + print('\n'.join(matches)) +else: + print('No matches found') +#print(phoneRegex.findall('222-444-5644 234.355.1345 123 234 1231 ext234')) +#print(emailRegex.findall('parthpant4@gmail.com')) +#print(matches) \ No newline at end of file