Replacing replace's options to flags