Feb-06-2017, 11:39 PM
(Feb-06-2017, 08:33 PM)DBS Wrote: Hello,
I'm trying to formulate a regex search to see if this exact string, ''op_single_selector" exists in this line of text:
-> [!div class="op_single_selector"]
This is what I have now that's not working:
selector_string = False single_selector_regex_search_string = re.compile(r"[\+-]>\s\[op_single_selector\]") if single_selector_regex_search_string.search(file_information.patch): selector_string = True
Not surprising, if only because you are trying to match:
"op
with[op
or"]
withor]
[\+-]>\s
IMHO, better use the
markdown
utility to convert the whole thing to full HTML and handle the HTML with an HTML parser.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Your one-stop place for all your GIMP needs: gimp-forum.net