Commit 45bb61f8 authored by Jorn Bruggeman's avatar Jorn Bruggeman
Browse files

python driver: fixed unit regex

parent d0c18104
......@@ -67,8 +67,8 @@ unicodesubscript = {'1':u'\u2081','2':u'\u2082','3':u'\u2083',
'0':u'\u2080'}
supnumber = re.compile('(?<=\w)(-?\d+)(?=[ \*+\-/]|$)')
supenumber = re.compile('(?<=\d)e(-?\d+)(?=[ \*+\-/]|$)')
oldsupminus = re.compile('/(\w+)(?:\*\*)|\^(\d+)(?=[ \*+\-/]|$)')
oldsup = re.compile('(?<=\w)(?:\*\*)|\^(-?\d+)(?=[ \*+\-/]|$)')
oldsupminus = re.compile('/(\w+)(?:\*\*|\^)(\d+)(?=[ \*+\-/]|$)')
oldsup = re.compile('(?<=\w)(?:\*\*|\^)(-?\d+)(?=[ \*+\-/]|$)')
oldsub = re.compile('(?<=\w)_(-?\d+)(?=[ \*+\-/]|$)')
def createPrettyUnit(unit):
def replace_superscript(m):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment