I have a webserver program to process requests from browser, which is written in c++. There are lots of services, bbs/wiki/news, to name just a few. They have different url, for instance:

1. /bbs/viewtopic?tid=1
2. /wiki/doc?did=1
3. /news/artical?aid=1

now I do URI parse myself, then do if else. I'll take bbs as an example here, if string starts with /bbs/, bbs will take over then following process, then bbs will continue to check if it is viewtopic, if so, sever will sent topic content to client side...

I have a lot of if else to dispatch request to different service, meanwhile, each service has a lot if else to do different actions as well.

I don't know whether if else is a smart choice, even thoug codes are easy to understand.
Is regex is faster for such application?

Thanks for your participation:)