Example usage for org.apache.wicket.util.parse.metapattern MetaPattern ANYTHING_NON_EMPTY

List of usage examples for org.apache.wicket.util.parse.metapattern MetaPattern ANYTHING_NON_EMPTY

Introduction

In this page you can find the example usage for org.apache.wicket.util.parse.metapattern MetaPattern ANYTHING_NON_EMPTY.

Prototype

MetaPattern ANYTHING_NON_EMPTY

To view the source code for org.apache.wicket.util.parse.metapattern MetaPattern ANYTHING_NON_EMPTY.

Click Source Link

Document

Constant for anything non-empty (string).

Usage

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);
}