Hello,
This is possible on MX with flexible offset filters
Requires JUNOS 14.2 and newer.
I personally wrote such filters for a customer of mine albeit for a different task but I know that these filters are very adaptable and can match arbitrary bit pattern in an IP packet/MPLS frame/Ethernet frame.
Please contact Your Juniper account team if You have difficulty configuring those so that Juniper Professional Services could help You.
HTH
Thx
Alex