Re: regular expressions

2010-09-14 Thread Imad Elharoussi
tespace mixed, but must be > preceded by "word" characters. > > \w+\s+\d+ will match "word" characters followed by whitespace followed > by one or more digits. > > Have a look at the regex syntax here: > http://docs.python.org/library/re.html > > Regular e

Re: regular expressions

2010-09-14 Thread Shawn Milochik
\w+[\w\s]+ will match word and/or whitespace mixed, but must be preceded by "word" characters. \w+\s+\d+ will match "word" characters followed by whitespace followed by one or more digits. Have a look at the regex syntax here: http://docs.python.org/library/re.html Regular express

regular expressions

2010-09-14 Thread Imad Elharoussi
How do we make reference to a string that can contain a whitespace in the urls.py -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

Re: Model Method Regular Expressions

2007-06-09 Thread Kent Johnson
hass wrote: > I'm trying to set up a model with a field that swallows a healthy > dollop of html, such as a youtube embed code. > > But then, I want to use regular expressions to strip that code into > pieces that I can access independently. My first thought is that some >

Model Method Regular Expressions

2007-06-07 Thread hass
I'm trying to set up a model with a field that swallows a healthy dollop of html, such as a youtube embed code. But then, I want to use regular expressions to strip that code into pieces that I can access independently. My first thought is that some regular expression kungfu could do

Re: \d and \w regular expressions?

2007-05-09 Thread Ian Lawrence
Ola, http://www.amk.ca/python/howto/regex/ is a pretty gentle intro []'s Ian On 5/9/07, gsmith <[EMAIL PROTECTED]> wrote: > > Is there any documentation of what these do? I'm assuming that this > is a Python regular expression? > > The reason I ask is becuase I have a line in my urls.py file

Re: \d and \w regular expressions?

2007-05-08 Thread James Bennett
> '[-\w-]' is character class combining '\w' and a hyphen Had a typo there; should be '[-\w]' -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: \d and \w regular expressions?

2007-05-08 Thread James Bennett
On 5/8/07, gsmith <[EMAIL PROTECTED]> wrote: > I don't understand what [\w-]{1,100} and [\w-]+ are doing. Can you > please explain? Your best bet is to consult a good reference on regular expressions; they're among the topics that "every programmer needs to understand".

Re: \d and \w regular expressions?

2007-05-08 Thread gsmith
limodou, I don't understand what [\w-]{1,100} and [\w-]+ are doing. Can you please explain? Thank You On May 8, 9:55 pm, limodou <[EMAIL PROTECTED]> wrote: > On 5/9/07, gsmith <[EMAIL PROTECTED]> wrote: > > > > > > > Is there any documentation of what these do? I'm assuming that this > > is a

Re: \d and \w regular expressions?

2007-05-08 Thread limodou
On 5/9/07, gsmith <[EMAIL PROTECTED]> wrote: > > Is there any documentation of what these do? I'm assuming that this > is a Python regular expression? > > The reason I ask is becuase I have a line in my urls.py file that > looks like this > > (r'^csi/rso/(news|members)/(\w{1,100})/$', >

\d and \w regular expressions?

2007-05-08 Thread gsmith
Is there any documentation of what these do? I'm assuming that this is a Python regular expression? The reason I ask is becuase I have a line in my urls.py file that looks like this (r'^csi/rso/(news|members)/(\w{1,100})/$', 'mysite.rso.views_rso.showtitlepage'), This works fine when the