In theory - as mentioned by others - you can substitute Regex with basic string operations or different operations with various libraries. The question remains why you would want to do this as it is way more code and way more effort.
I use Regex a lot - and I keep forgetting what what does basically all the time.
Usually I go to RegexOne for a quick reminder.
Next I usually go to Pythex - there you can quickly test your Python Regex live with a sample string you provide and there is even a quick cheat sheet provided.
So all in all you can keep a file with 3-4 lines of code snippets like:
# dataframe ds from pandas-library ds['COLUMN_NAME'].str.replace('REGEX HERE', regex=True) # to replace strings in a column re.sub('REPLACE THIS REGEX PATTERN', 'WITH THIS REGEX PATTERN', input) # simple replace re.match('SEARCH FOR THIS REGEX PATTERN', 'IN THIS STRING') # returns a match if a match is found at BEGINNING of string re.search('SEARCH FOR THIS REGEX PATTERN', 'IN THIS STRING') # returns a match if pattern is found ANYWHERE in string
(This is a code snipped file I use a lot.)
When keeping something like this adjusted for your needs and using Pythex; regex in python is really just a copy-paste job for the rest of your life (for the most part).
Edit: I think I didn't point out enough on how this will solve your
It's not clear to me what the regex i've written will match, which is of extra concern during (auto) testing
Problem. I recommended Pythex because you can put any string for your sample data you want into it and see right away what it matches which is quite comfortable. You could of course turn your "snippet file" I suggested into a "testing file" by providing the sample code with a text input so you have a script to test your regex quickly all the time.
Maybe you could elaborate more on:
The backslash problem (Python-specific) - reference (i've had problems when using raw strings too)
Because I don't really see how this is a problem - the article you linked even pointed out the solution by using raw strings I guess.
Hope it helps.