Use REGEXP to determine if a string matches a regular expression.
REGEXP
Usage
To use the REGEXP function, your database must support regular expressions.
Examples
Example 3-11 shows how to use this JPQL extension.
Example 3-11 Using REGEXP EQL
e.lastName REGEXP '^Dr\.*'
See Also
For more information, see:
"JPQL" http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Querying/JPQL
http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Querying/JPQL