Myanmar NRC

Validation and normalization for Myanmar NRC number.

myanmar.nrc.is_valid_nrc(nrc)[source]

Check whether the given string is valid Myanmar national registration ID or not

>>> is_valid_nrc('12/LMN (N) 144144')
True
>>> is_valid_nrc('5/PMN (N) 123456')
False
myanmar.nrc.normalize_nrc(nrc)[source]

Check the given string is valid myanmar nrc or not and normalize the string to simplest form if the string is valid

>>> normalize_nrc('9/pmn(n)123456')
'9 pamana n 123456'
>>> normalize_nrc('1/bkn(n)123456')
'1 bakana n 123456'