Regular expresion : I'm trying to understand regex, and I want to prevent entering numbers starting with 550, if length is 8, or starting with 393 if length is 5. 

Tried it here (https://regex101.com/) and the correct expression is shown below

    ^((?!550)\d{8}|(?!393)\d{5})$

but the mask in my code works in «online» mode, and for some reason allows only numbers starting with 550 or 393, the rest of the input is forbidden (can't even enter 10000). How to remake this expression?
