Parsing of these should be as simple as possible, so the placeholders should be delimited by some URI-invalid character (e.g. {}) and later on differentiated from each other by some identifying string pattern at the beginning of the character sequence (e.g. {@myvar}, {?myothervar}).
'/myroute/{@dynamicPart}': '/{@dynamicPart}/myotherroute'