- Code: Select all
# a raw string with an open bracket:
# this is a valid regex, but breaks the highlighting too...
print "oh no! Where's the syntax highlighting?"
# ] this close bracket will turn the highlighting back on for subsequent text...
print "phew! The syntax highlighting has returned!"
Note that the second string is a valid regex that matches either a '[' or a ']'. This is the same for triple quoted raw strings.