samedi 23 décembre 2017

How to find a string inside of a string space insensitive?

For example if a string contains:

odfsdlkfn dskfThe Moonaosjfsl dflkfn

How can I check to see if it contains "The Moon"?

What I have currently been doing is (but does not work):

if string.find("The Moon")!=-1:
    doSomething

Is there anyway to do this?

Thanks!

Aucun commentaire:

Enregistrer un commentaire