As Andy said, we'll need to see examples of where it doesn't work but I'm wondering why your regex is constricted with a "?" after the initial /?