Skip to content

Commit

Permalink
Merge pull request #4116 from chennes/fixAirfoilImportNumberRegex
Browse files Browse the repository at this point in the history
[Draft] Fix airfoil data detection regex
  • Loading branch information
yorikvanhavre committed Dec 14, 2020
2 parents dd580a4 + 50d97a3 commit fe721a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Mod/Draft/importAirfoilDAT.py
Expand Up @@ -157,9 +157,9 @@ def process(doc, filename):
with the parsed information.
"""
# Regex to identify data rows and throw away unused metadata
xval = '(?P<xval>(\-|\d*)\.\d+(E\-?\d+)?)'
yval = '(?P<yval>\-?\s*\d*\.\d+(E\-?\d+)?)'
_regex = '^\s*' + xval + '\,?\s*' + yval + '\s*$'
xval = r'(?P<xval>(\-|\d*)\.*\d*([Ee]\-?\d+)?)'
yval = r'(?P<yval>\-?\s*\d*\.*\d*([Ee]\-?\d+)?)'
_regex = r'^\s*' + xval + r'\,?\s*' + yval + r'\s*$'

regex = re.compile(_regex)
afile = pythonopen(filename, 'r')
Expand Down

0 comments on commit fe721a1

Please sign in to comment.