On Wed, 2010-03-10 at 10:09 +0000, Soren Hansen wrote:
> On Wed, Mar 10, 2010 at 03:32:13AM -0000, Bernie Innocenti wrote:
> > one could reach a similar level of conciseness even in Python:
> >
> > re.sub(r"[^A-Za-z0-9]", "_", foo)
>
> No. The first character cannot be a numeral as per
>
> http://munin-monitoring.org/wiki/notes_on_datasource_names
Oh, right. Then... hmmm... we could use two alternate patterns:
On Wed, 2010-03-10 at 10:09 +0000, Soren Hansen wrote: r"[^A-Za- z0-9]", "_", foo) munin-monitorin g.org/wiki/ notes_on_ datasource_ names
> On Wed, Mar 10, 2010 at 03:32:13AM -0000, Bernie Innocenti wrote:
> > one could reach a similar level of conciseness even in Python:
> >
> > re.sub(
>
> No. The first character cannot be a numeral as per
>
> http://
Oh, right. Then... hmmm... we could use two alternate patterns:
re.sub( r"^[^A- Za-z]|[ ^A-Za-z0- 9]", "_", foo)
-- codewiz. org/ sugarlabs. org/
// Bernie Innocenti - http://
\X/ Sugar Labs - http://