Skip to content

Commit

Permalink
Updated to allow for joining of capture groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian S. Pringle committed Sep 25, 2020
1 parent 7f1f17e commit c42b02c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion phoneNumbers/numberInClipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def main():
text = str(pyperclip.paste())
matches = []
for groups in regexCompile.findall(text):
phoneNumber = groups[0]
phoneNumber = ''.join(groups)
matches.append(phoneNumber)

if len(matches) > 0:
Expand Down
2 changes: 1 addition & 1 deletion phoneNumbers/numberInFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def main():
matches = []
# Find all phone numbers and store them in matches
for groups in regexCompile.findall(openedContent):
phoneNumber = groups[0]
phoneNumber = ''.join(groups)
matches.append(phoneNumber)

openedFile.close()
Expand Down
17 changes: 17 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c42b02c

Please sign in to comment.