EC2 compound tags and limiting dynamic inventory

I’m using ec2.py dynamic inventory successfully with limiting by multiple tags, but my need is to be able to limit by a tag where one of the compound values matches, but I haven’t found a way to do so yet.

Example: Tag = Apps Compound value = app1|app2|app3|app4

I’m kicking this off via Jenkins, using the Invoke Ansible Playbook build step, where I’m passing -i ec2.py under “Additional parameters” and passing the limit under the “Host subset” section. The “Host subset” tags are built with variables passed in:

tag_Apps_${appname},tag_Location_${location}

I’m passing in one of the compound values as appname. Is there a way to do a limit with a tag where at least one of the compound values matches? Obviously the way I’m building the tag now and passing it in doesn’t work since it looks for that exact tag - just showing a working example of what works for a tag with a single value.