I am trying to learn some things about Regex. I am starting off by trying to hide some matches for a nine digit number, such as a SSN, but let through all nine digit numbers that have the word "order" or "routing number" but it seems that only strings that have the same length will work. Is there any way around this without creating multiple lines? Thanks!
(?<!(Order:\s|Routing\snumber:\s))
(?!000|666)([0-6]\d\d|7[01256]\d|73[0123]|77[012])
([-]?)
([1-9]{2})
\3
([1-9]{4})
(?!([\w&/%"-]))
For blocking out SSNs, this one seems to work
^(?!000)(?!666)(?!9)\d{3}([- ]?)(?!00)\d{2}\1(?!0000)\d{4}$
but I want it to not block out any 9 digit numbers that have the words "order" or "routing number" in front of them.