How can python's regular expression match two different results at the same time?
黄舟
黄舟 2017-05-18 11:00:13
0
1
492
category = re.findall('(?<=compatible; )([^/]+)', line)
category = re.findall('(?<="-" ")([^"]+)', line)

How to make category match the data in these two regular expressions at the same time

How to merge two regular sentences together

Because if written like this, he will only recognize the following regular expression

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
漂亮男人

re.findall('(?<=compatible; )([^/]+) | (?<="-" ")([^"]+) ', line)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!