if (countryCode === "KAZ") { | |
const result = block.text.match(/^(([0-9]{3})([0-9]{2})([A-Z]{2,3}))$/) | |
|| block.text.match(/^(([A-Z]{3})([0-9]{2})([0-9]{2,3}))$/); // Trailers | |
if (result && result.length == 5 && parseInt(result[3], 10) <= 20) { // Region code within [01-20] -> https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Kazakhstan#Regional_codes | |
block.text = (!Number.isNaN(parseInt(result[2], 10)) ? (result[2] + result[4]) : (result[4] + result[2])) | |
+ result[3]; | |
} | |
} |
--
You received this message because you are subscribed to the Google Groups "doubango-ai" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doubango-ai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/doubango-ai/b96af76c-c857-4828-a0a8-d5016e1144aen%40googlegroups.com.