Utilities
Convenient common utilities to use.
Regex Pattern
/** regex to check if the Nrc is correct pattern */
const pattern = {
en: /\d{1,2}\/[A-Z]{6,6}\((N|E|P|T|R|S)\)\d{5,6}/,
mm: /[แ-แ]{1,2}\/[แ-แก]{3,3}\((แแญแฏแแบ|แงแแทแบ|แแผแฏ|แแฌแแแฌ|แแฌแแฎ|แ
)\)([แ-แ]{5,6}|[0-9]{5,6})/,
};
Functions
Convert English NRC string to Myanmar NRC string
function convertToMmNrc(engNrc: string): string;
Convert Myanmar NRC string to English NRC string
function convertToEnNrc(mmNrc: string): string;
De-structure NRC data from the NRC string
function splitNrc(nrc: string): {
nrcNumber: string;
nrcType: string;
stateNo: string;
townshipCode: string
};
Last updated