The regex patterns below only help validate when something is not valid ICD-10 or ICD-9. They do not ensure that the code exists. You should consult a list of valid ICD codes for that level of verification.
ICD-10-CM list: https://gist.github.com/jakebathman/063c50cb9772e4bfc864a9e1ff4ccc8d
ICD-9 list: https://gist.github.com/jakebathman/f1ed0d473f12091a708243b0ddf03d82
Useful for validating field values that could contain both, and may or may not use decimals