Wild Card String Comparison

W. eWatson notvalid2 at sbcglobal.net
Thu Aug 28 01:02:01 EDT 2008


Sean DiZazzo wrote:
> On Aug 27, 8:49 pm, "W. eWatson" <notval... at sbcglobal.net> wrote:
>> Is it possible to do a search for a wild card string in another string. For
>> example, I'd like to find "v*.dat" in a string called bingo. v must be
>> matched against only the first character in bingo, and not simply found
>> somewhere in bingo, as might be the case for "*v*.dat".
>> --
>>             Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
>>
>>               (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
>>                Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet
>>
>>                      Web Page: <www.speckledwithstars.net/>
> 
> Check:
> 
> http://docs.python.org/lib/string-methods.html
> http://docs.python.org/lib/module-re.html
> http://docs.python.org/lib/module-glob.html
> http://docs.python.org/lib/module-fnmatch.html
> 
> ~Sean
I'll take a look.

-- 
            Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

              (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
               Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

                     Web Page: <www.speckledwithstars.net/>



More information about the Python-list mailing list