If I understood you correctly, you can do such comparison using regular expressions. Example flow:
[{"id":"5244e2e4.f5961c","type":"inject","z":"12e6d248.858f5e","name":"AA B1 03 01F4 0532 1392 A091809180909090909090918180 55","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"AA B1 03 01F4 0532 1392 A091809180909090909090918180 55","payloadType":"str","x":290,"y":100,"wires":[["f6996a8a.32efe8"]]},{"id":"f6996a8a.32efe8","type":"switch","z":"12e6d248.858f5e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"^AA B1.*0532.*55$","vt":"str","case":false},{"t":"regex","v":"^AA B1.*0533.*55$","vt":"str","case":false}],"checkall":"false","repair":false,"outputs":2,"x":250,"y":260,"wires":[["d3b47775.523988"],["1a52717b.a8030f"]]},{"id":"d3b47775.523988","type":"debug","z":"12e6d248.858f5e","name":"0532","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":410,"y":240,"wires":[]},{"id":"6a74643a.49480c","type":"inject","z":"12e6d248.858f5e","name":"AA B1 03 01F4 0533 1392 A091809180909090909090918180 55","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"AA B1 03 01F4 0533 1392 A091809180909090909090918180 55","payloadType":"str","x":290,"y":160,"wires":[["f6996a8a.32efe8"]]},{"id":"1a52717b.a8030f","type":"debug","z":"12e6d248.858f5e","name":"0533","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":410,"y":280,"wires":[]}]
In the switch node regex comparison the ^ indicates the start of string, .* any character any number of times and $ the end of string. The letters and numbers are what needs to be found in between these symbols.