regex - Python testing if whitespace(\s) symbol is in string -
i have problem testing if "\s" symbols present in string. example '\sgoogle\s.com' must show there is. # use raw strings ignore escapes: s = r'\sgoogle\s' print s, s.find(r'\s') != -1 # , regex: import re print re.search(r'\\s', s) gives: \sgoogle\s true <_sre.sre_match object @ 0x7f2d696fc850>