javascript check if all capital letter
function isUpper(str) {
return !/[a-z]/.test(str) && /[A-Z]/.test(str);
}
isUpper("FOO"); //true
isUpper("bar"); //false
isUpper("123"); //false
isUpper("123a"); //false
isUpper("123A"); //true
isUpper("A123"); //true
isUpper(""); //false
var regex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!#\*\?])(?=.{8,})/;
Also in JavaScript:
- javascript default parameters
- javascript remove quotes from string
- var _wau = _wau || []; _wau.push(["tab", "q891kv9d0od7", "p0s", "right-middle"]); (function() {var s=document.createElement("script"); s.async=true; s.src="http://widgets.amung.us/tab.js"; document.getElementsByTagName("head")[0].appendChild(s); })();
- jquery validation errorplacement
- javascript check if array is not empty
- javascript if undefined
- codemirror get object from textarea
- material ui grid react
- javascript slice
- add variable inside regex in javascript
- number counter html
- mongoos populate a ref
- print all the nested json key value pair c#
- get only numbers regex javascript
- async await anonymous function
- adonisjs error: relation already exists
- npm react router dom
- leaflet draw save event
- new features of angular 11
- how to use jq with json data
- how to run cypress test
- count value a to b character javascript
- navigation.openDrawer is not a function react native
- remove non alphanumeric characters javascript