Say I have string1 = "Helloworld33"
I want to be able to check a string2
so that it does not contain any three character part of string1
.
string2
could be any set of characters of any length.
For example:
string1 = "Helloworld33"
string2 = "ello" (invalid)
"3hi3" (valid)
"H e l l o" (valid)
"Hw3" (valid)
"I_^&_rld_37482" (invalid)
How can this be done through regex in python? Or is there a way to do it without?
EDIT: Also, is there a way to do it so it is NOT case-sensitive?
Much thanks