You could change the route target extended community attribute in the same way as the standard community attribute. However, setting extended community attributes through route maps applied to route redistribution, or to BGP neighbors, is not supported; this type of change must be implemented using export maps.
The following example shows the error that is produced if you try to change the route target through a route map.
Router(config-route-)# set extcommunity rt 100:100
% "ExtendedCommOut" used as BGP outbound route-map, set extcommunity rt not supported