Y
Yoav
I don't understand why the two REs produce a different result. I read
the RE guide but still I can't seem to figure it out.
files"', '')]
Also, does '|' char (meaning or) produces a pair for each section. I
don't understand how it works. Can someone please direct me to a place
which will explain it?
Thanks.
the RE guide but still I can't seem to figure it out.
[('name', '', 'name'), ('pass', '', 'pass'), ('"/ret files"', '"/ret>>> t 'echo user=name password=pass path="/ret files"\r\n'
>>> re.findall(r'(?<=\s)[^=]+=((?:".*")|(?:\S*))(?=\s)', t) ['name', 'pass', '"/ret files"']
>>> re.findall(r'(?<=\s)[^=]+=((".*")|(\S*))(?=\s)', t)
files"', '')]
Also, does '|' char (meaning or) produces a pair for each section. I
don't understand how it works. Can someone please direct me to a place
which will explain it?
Thanks.