| java.lang.Object sun.misc.Regexp
Regexp | public class Regexp (Code) | | A class to represent a regular expression. Only handles '*'s.
author: James Gosling |
Constructor Summary | |
public | Regexp(String s) Create a new regular expression object. |
Method Summary | |
public static void | main(String argv) | final boolean | matches(String s) Returns true iff the String s matches this regular expression. | boolean | matches(String s, int offset, int len) Returns true iff the substring of s from offset for len characters
matches this regular expression. |
exact | public boolean exact(Code) | | |
ignoreCase | public boolean ignoreCase(Code) | | if true then the matching process ignores case.
|
prefixLensuffixLentotalLen | public int prefixLensuffixLentotalLen(Code) | | |
Regexp | public Regexp(String s)(Code) | | Create a new regular expression object. The regular expression
is a series of constant strings seperated by *s. For example:
- *.gif
- Matches any string that ends in ".gif".
- /tmp/*
- Matches any string that starts with "/tmp/".
- /tmp/*.gif
- Matches any string that starts with "/tmp/" and ends
with ".gif".
- /tmp/*new*.gif
- Matches any string that starts with "/tmp/"
and ends with ".gif" and has "new" somewhere in between.
|
matches | final boolean matches(String s)(Code) | | Returns true iff the String s matches this regular expression.
|
matches | boolean matches(String s, int offset, int len)(Code) | | Returns true iff the substring of s from offset for len characters
matches this regular expression.
|
|
|