On Thu, Mar 3, 2011 at 2:52 AM, Simon King <simon.k...@uni-jena.de> wrote: > Hi Burcin and all, > > On 2 Mrz., 17:36, Burcin Erocal <bur...@erocal.org> wrote: >> People might want to use utf-8 strings which won't be valid under that >> condition. See #7496: >> >> http://trac.sagemath.org/sage_trac/ticket/7496 > > I was reading in the Python docs of the re module that the meaning of > \w depends on the locale settings. So, I expected that "it just works" > with > re.match("(?!\d)\w*\Z", variable_name, re.LOCALE|re.UNICODE) > > It matches anything that is formed by letters, digits and underscores > but does not start with a digit. I thought that the re.LOCALE would > make the regular expression accept that a German umlaut is a letter, > but apparently it doesn't, even after using > sage: import locale > sage: locale.setlocale(locale.LC_ALL, 'de_DE') > > What is needed to do in order to "localize" a regular expression?
-100 for valid identifiers/sage variable names to be a function of the users locality. - Robert -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org