regex if contains capital letters javascript code example
Example: regex only uppercase letters js
if (value.match(/^[A-Z]*$/)) {
// matches
} else {
// doesn't match
}
if (value.match(/^[A-Z]*$/)) {
// matches
} else {
// doesn't match
}