Here are some useful resources:
https://docs.python.org/3/howto/regex.html
An interactive tool for creating (and learning regex): https://regex101.com/
>>> import re
>>> p = re.compile(r'(sd_src:\s?)(\".+\")')
>>> m = p.match('sd_src:"http//video.mp4"')
>>> matches = m.groups()
>>> matches[1]
'"http//video.mp4"'
Explanation: from the regex101 tool.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/aaae851e-db8f-4348-a183-e19073cfc981o%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.
See:
https://docs.python.org/3/howto/regex.html#performing-matches
use search instead of match, match is for checking the re at the beginning of a string.
>>> string = 'hello this is line ,sd_src:"https://video?=j.mp4"'
>>> m = re.compile(r'(sd_src:\s?)(\".+\")')
>>> result = m.search(string)
>>> url = result.groups()[1]
>>> url
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/ff30c272-b761-4c16-b5b3-12e216e00a06o%40googlegroups.com.