Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
#44 allow dots in regex
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwunderbar666 committed Dec 7, 2021
1 parent 282198a commit b048df9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flaskinventory/flaskdgraph/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def strip_query(query):
# towards certain special characters
# for term matching and regex these characters
# can simply be removed
return re.sub(r'"|/|\\|\(|\)|<|>|\{|\}|\[|\]|\$|&|#|\+|\^|\?|\*|\.', '', query)
return re.sub(r'"|/|\\|\(|\)|<|>|\{|\}|\[|\]|\$|&|#|\+|\^|\?|\*', '', query)

def escape_query(query):
return re.sub(r'("|/|\\|\(|\)|<|>|\{|\}|\[|\]|\$|&|#|\+|\^|\?|\*|\.)', r'\\\1', query)
return re.sub(r'("|/|\\|\(|\)|<|>|\{|\}|\[|\]|\$|&|#|\+|\^|\?|\*)', r'\\\1', query)

0 comments on commit b048df9

Please sign in to comment.