in reply to Avoid a single value in the url

Is it possible using of this way. Please correct  https?://(www.)?(abc.com|fdsf.com|3545ab.com|tyrty.com)[^/]*/((?!gallery)).*/.*/.*/.*/