Skip to content

Commit 3a9aa72

Browse files
author
rootware
committed
Fixed time regex again.
1 parent d5f180b commit 3a9aa72

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ and simply didn't have the time to go back and retroactively create one.
1818

1919
- None at the moment.
2020

21+
## [0.0.4] - 2022-07-28
22+
23+
Fixed time regex again.
24+
25+
### Changed
26+
27+
- Fixed time regex again.
28+
2129
## [0.0.3] - 2022-07-28
2230

2331
Fixed time regex

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ This is a collection of commonly used regular expressions. This library provides
3131
```python
3232
import commonregex_improved as CommonRegex
3333

34-
text = "John, please get that article on www.linkedin.com to me by 5:00PM on Jan 9th 2012. 4:00 would be ideal, actually. If you have any questions, You can reach me at (519)-236-2723x341 or get in touch with my associate at harold.smith@gmail.com. You can find my ip address at 127.0.0.1 or at 64.248.67.225. I also have a secret protected with md5 8a2292371ee60f8212096c06fe3335fd"
34+
text = "John, please get that article on www.linkedin.com to me by 5:00PM on Jan 9th 2012. 4:00 would be ideal, actually or 5:30 P.M. If you have any questions, You can reach me at (519)-236-2723x341 or get in touch with my associate at harold.smith@gmail.com. You can find my ip address at 127.0.0.1 or at 64.248.67.225. I also have a secret protected with md5 8a2292371ee60f8212096c06fe3335fd"
3535

3636
date_list = CommonRegex.dates(text)
3737
# ['Jan 9th 2012']
3838
time_list = CommonRegex.times(text)
39-
# ['5:00PM', '4:00']
39+
# ['5:00PM', '4:00 ', '5:30 P.M.']
4040
url_list = CommonRegex.links(text)
4141
# ['www.linkedin.com', 'harold.smith@gmail.com']
4242
phone_list = CommonRegex.phones_with_exts(text)

commonregex_improved.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def dates(text: str) -> list:
110110
return match(text, regex_map["dates"])
111111

112112
def times(text: str) -> list:
113-
return match_by_regex_search(text, regex_map["times"])
113+
return match(text, regex_map["times"])
114114

115115
def phones(text: str) -> list:
116116
return match(text, regex_map["phones"])

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "commonregex-improved"
7-
version = "0.0.3"
7+
version = "0.0.4"
88
description = "Python cli tool to redact sensitive data"
99
authors = ["brootware <brootware@outlook.com>"]
1010
license = "MIT"

0 commit comments

Comments
 (0)