Spring spel regex tutorial
Spring SpEL Regex: Spring SpEL provides the facility to support regular expressions using keyword “matches“. Syntax: #{‘value’ matches ‘regex’ } Example: RegexTest.java import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @Component("regexTestBean") public class RegexTest { // Check if this is a digit or not? @Value("#{‘250’ matches ‘\\d+’ }") private boolean validDigit; public boolean isValidDigit() { return validDigit; … Read more