The fucking best regex ever

pull/157/head
Chuck Sneed 2023-06-26 08:55:13 -05:00
parent 4422613464
commit d5987ad70e
1 changed files with 2 additions and 2 deletions

View File

@ -98,8 +98,8 @@ xmaxed_regex = re.compile('(?<=^|(?<=\s))(([a-zA-Z]+?)(s)?max*ed)(?=$|\n|\s|[.?!
xmaxing_regex = re.compile('(?<=^|(?<=\s))(([a-zA-Z]+?)(s)?max*ing)(?=$|\n|\s|[.?!,])', flags=re.I|re.A)
initial_part_regex = re.compile('(?<=^)(>+)', flags=re.I|re.A)
#matches "the" or is, but only if it is not followed by "fucking"
the_fucking_regex = re.compile('(?<=^|(?<=\s))(the|(is (?:your|her|his|their|no|a|not|to|so|this|the|our|what)( (a|the))?)|is)(?=$|\n|\s)(?! fucking)', flags=re.I|re.A)
#matches "the" or is, but only if it is not followed by "fucking". https://regex101.com/r/yxuYsQ/2
the_fucking_regex = re.compile('(?<=^|(?<=\s))((?:the|a)( (?:only))?|((that )?(?:is|are|was|were|will be|would be)( (?:your|her|his|their|no|a|not|to|too|so|this|the|our|what))?( (a|the))?)|is)(?=\s)(?! fucking)', flags=re.I|re.A)
#matches a single question mark but only if it isn't preceded by ", bitch"
bitch_question_mark_regex = re.compile('(?<!\?|\!)(?<!, bitch)(\?)(?!!|\?)(?=\s|$)', flags=re.I|re.A)
#matches a single exclamation point but only if it isn't preceded by ", motherfucker"