Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the regex NUMBER_PATTERN in _input_base.py #72

Merged
merged 1 commit into from
Oct 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/qe_tools/parsers/_input_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

NUMBER_PATTERN = r"""
(?:
[-|+]? # Plus or minus in front of the number (optional)
[-+]? # Plus or minus in front of the number (optional)
(?:\d* # optional decimal in the beginning .0001 is ok, for example
[\.] # There has to be a dot followed by
\. # There has to be a dot followed by
\d+) # at least one decimal
| # OR
(?:\d+ # at least one decimal, followed by
[\.]? # an optional dot
\.? # an optional dot
\d*) # followed by optional decimals
(?:[E|e|d|D][+|-]?\d+)? # optional exponents E+03, e-05, d0, D0
(?:[EedD][+-]?\d+)? # optional exponents E+03, e-05, d0, D0
)
"""

Expand Down
Loading