The complement of a regular language is a regular language, and for any given regular language we can check whether a string is a member of that language in O(length of the string) time.
Yes, depending on how you represent your regular language, the complement operator might not work play nicely with that representation. But eg it's fairly trivial for finite state machines or when matching via Brzozowski derivatives. See https://en.wikipedia.org/wiki/Brzozowski_derivative