You can use an extended community filter when using the route target (RT) attribute to filter routes.

set routing extcommunity-list standard <community-list-name> {deny|permit} {rt|soo} extcommunity <extcommunity>

set routing extcommunity-list expanded <community-list-name> {deny|permit} regex <regular-expression>

The following example configures a standard extended community filter:

admin@Xorplus# set routing extcommunity-list standard EXTcom1 permit rt extcommunity 20
admin@Xorplus# commit