From: Vivien Maisonneuve <v.maisonneuve@gmail.com>
Date: Tue, 19 Aug 2014 09:49:10 +0000 (+0200)
Subject: Allow leading underscores in symbols in LinExpr.fromstring()
X-Git-Tag: 1.0~53
X-Git-Url: https://svn.cri.mines-paristech.fr/git/linpy.git/commitdiff_plain/ba88e64fedc541e9e3766e258a6cfa051acf56d9

Allow leading underscores in symbols in LinExpr.fromstring()
---

diff --git a/linpy/linexprs.py b/linpy/linexprs.py
index b5864e1..b97f048 100644
--- a/linpy/linexprs.py
+++ b/linpy/linexprs.py
@@ -331,7 +331,7 @@ class LinExpr:
                 return left / right
         raise SyntaxError('invalid syntax')
 
-    _RE_NUM_VAR = re.compile(r'(\d+|\))\s*([^\W\d_]\w*|\()')
+    _RE_NUM_VAR = re.compile(r'(\d+|\))\s*([^\W\d]\w*|\()')
 
     @classmethod
     def fromstring(cls, string):