List of usage examples for org.apache.wicket.util.parse.metapattern MetaPattern ANYTHING_NON_EMPTY
MetaPattern ANYTHING_NON_EMPTY
To view the source code for org.apache.wicket.util.parse.metapattern MetaPattern ANYTHING_NON_EMPTY.
Click Source Link
From source file:org.wicketstuff.rest.resource.urlsegments.ParamSegment.java
License:Apache License
@Override protected MetaPattern loadMetaPattern() { String segmentContent = this.toString(); int semicolonIndex = segmentContent.indexOf(':'); if (semicolonIndex < 0) return MetaPattern.ANYTHING_NON_EMPTY; String regExp = segmentContent.substring(semicolonIndex + 1, segmentContent.length() - 1); Matcher matcher = REGEXP_BODY.matcher(regExp); matcher.matches();// w ww . j a v a 2s .c o m String group = matcher.group(); return new MetaPattern(group); }