javascript - Regex for determining if Alphanumeric code is in range -


i'm working on icd10 diagnosis code application. need determine if 1 icd10 code falls in range. example:

code: 4a1h7ez

range: 4a1h7cz - 4a1h7hz

this should return 'true'.

i've tried converting alpha characters numbers (a=0, b=1 etc) resulting number conflicts other ranges/codes.

regex isn't strong point, suggestions appreciated.

do have use regex? seen here in comparing 2 strings alphabetically sorting purposes javascript auto compares strings.

so "4a1h7ez" > "4a1h7cz" && "4a1h7ez" < "4a1h7hz" return true


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -