Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

check if string is uuid

// For test 01234567-9ABC-DEF0-1234-56789ABCDEF0 use Regex
Regex reg = new Regex("/^[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}$/");

// with brackets
Regex reg = new Regex("/^{?[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}}?$/");
// use https://regexr.com/ for a REGEX builder
Comment

PREVIOUS NEXT
Code Example
Java :: change string into binary uding java 
Java :: java opts 
Java :: android switch on change 
Java :: java empty array 
Java :: spigot disable join message 
Java :: printing 2d array in java 
Java :: check if sqlexception is duplicate entry java 
Java :: reverse a integer in java 
Java :: Delete end element in string java 
Java :: what does static mean java 
Java :: how to convert char to uppercase java 
Java :: initialize scanner java 
Java :: JAVA Display Sum of n Natural Numbers 
Java :: hello world java code 
Java :: java parseint 
Java :: joining an array of strings in java 
Java :: char to unicode java 
Java :: arraylist syntax in java 
Java :: java time difference 
Java :: testing the web layer without authentication spring 
Java :: java base64 
Java :: java timer 
Java :: file append in java 
Java :: Using enum values as string literals 
Java :: BST in java 
Java :: write files with FileOutPutStream java 
Java :: find elements in selenium 
Java :: java get attributes from class 
Java :: Java char data type 
Java :: java throw an exception 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =