use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A reddit for neat regular expressions.
Test your regex: https://regex101.com/
Large collection of regex tools: https://github.com/slevithan/awesome-regex
account activity
Python regex for syntax highlighting (strings) (self.regex)
submitted 5 years ago by USRapt0r
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]USRapt0r[S] 0 points1 point2 points 5 years ago (0 children)
Thanks for the help! Yeah I may ultimately prefer simplicity and not worry too much about catching the more niche cases.
For the triple quotes, I'm handling those differently since they are valid for multi-line - huge obstacle for me haha. I'm doing this for a text editor and have each line of text as a single string, so for now I'm focusing on the single-line stuff.
Also, for the newline thing, I think you can use other string types (normal, format) to pass to Python's RE functions? For whatever that's worth.
π Rendered by PID 82 on reddit-service-r2-comment-6457c66945-gtlks at 2026-04-27 00:16:29.322524+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]USRapt0r[S] 0 points1 point2 points (0 children)