Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript check format uuid

// Regular expression to check if string is a valid UUID
const regexExp = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/gi;

// String with valid UUID separated by dash
const str = "a24a6ea4-ce75-4665-a070-57453082c256";

regexExp.test(str); // true
Comment

PREVIOUS NEXT
Code Example
Javascript :: how #region javascript 
Javascript :: javascript int max 
Javascript :: js get element distance from top 
Javascript :: how to pad string js 
Javascript :: camelcase to hyphenated javascript 
Javascript :: javascript convert between string and ascii 
Javascript :: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createContext is not a function 
Javascript :: generate otp using javascript 
Javascript :: how to append select option in jquery 
Javascript :: jquery get form data 
Javascript :: javascript document load 
Javascript :: node js stop 
Javascript :: babel cdn react 
Javascript :: javascript remove parentheses 
Javascript :: remove all node_modules folders recursively 
Javascript :: jquery is numeric 
Javascript :: node format variable in string 
Javascript :: Could not resolve dependency error peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4 
Javascript :: javascript sum array values by key 
Javascript :: angular rebuild 
Javascript :: js check if date is today 
Javascript :: javascript get all elements with class 
Javascript :: remove slashes from string javascript 
Javascript :: border react native 
Javascript :: js startswith 
Javascript :: Javascript detect mobile browser 
Javascript :: insertafter jquery 
Javascript :: generate random ip address javascript 
Javascript :: es6 add and remove class 
Javascript :: create a new input with type checkbox javascript 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =