Re: If search string contains a number ... Do this ...

2009-10-22 Thread Grant Livingston
What about using pythons regular expression module (re) ? Example, if re.search("\d", "Search query 2 search"): # Do this. else: # Do this instead. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users

If search string contains a number ... Do this ...

2009-10-22 Thread The Danny Bos
Hey guys, In a view, is there a way to check if a search/querystring has a number in it? If number in string: do this otherwise: do this instead ... Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou