More readable and maintainable code

Instead of regex:

Pattern.compile("\\b\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\b");

Use:

"\\b\\p{Digit}{10}\\b"
or
"\\b\\d{10}\\b"
or
"\\b[0-9]{10}\\b"

Comments

Popular posts from this blog

Oracle JDBC ReadTimeout QueryTimeout

Sites, Newsletters, and Blogs

Locks held on Oracle for hours after sessions abnormally terminated by node failure