I am working in a license plate reading app using JavaScript. When I read the plate some additional text tends to be included as below: “280SILRJY2G74BR” I know that the license plate mask is XXXNXNN (X for letters and N for numbers) The number of characters and placement that are added varies with several conditions like image quality, proximity of the camera, state of conservation of the plate, etc So, in the example above, if I apply the given mask the real plate number, RJY2G74 is the part that would satisfy the mask.
After researching the subject and some help I arrived to:
RegExp(/[A-Z]{3}d{1}[A-Z]{1}d{2}/.exec(myText)?.[0]);
But it returns: ““/(?:)/”
Assistance welcome.