Как получить строку запроса POST, если < FORM DATA > не видно в настройках инструментов разработчика?

Попробуйте это с использованием границы слова в регулярном выражении:

>>> x="this is a sample"
>>> y="this isis a sample."
>>> regex=re.compile(r"\bis\b")  # For ignore case: re.compile(r"\bis\b", re.IGNORECASE)
>>> regex.findall(y)
[]
>>> regex.findall(x)
['is']

Из документации re.search() .

It matches the empty string, but only at the beginning or end of a word

E.g. r'\bfoo\b' matches 'foo', 'foo.', '(foo)', 'bar foo baz' but not 'foobar' or 'foo3'

Надеюсь, что это поможет!

0
задан vaibhav Khade 7 March 2019 в 09:38
поделиться