01: /**
02: * Copyright (c) 2001, Sergey A. Samokhodkin
03: * All rights reserved.
04: *
05: * Redistribution and use in source and binary forms, with or without modification,
06: * are permitted provided that the following conditions are met:
07: *
08: * - Redistributions of source code must retain the above copyright notice,
09: * this list of conditions and the following disclaimer.
10: * - Redistributions in binary form
11: * must reproduce the above copyright notice, this list of conditions and the following
12: * disclaimer in the documentation and/or other materials provided with the distribution.
13: * - Neither the name of jregex nor the names of its contributors may be used
14: * to endorse or promote products derived from this software without specific prior
15: * written permission.
16: *
17: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
18: * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20: * IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
21: * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23: * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
25: * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26: *
27: * @version 1.2_01
28: */package jregex;
29:
30: public interface REFlags {
31: /**
32: * All the foolowing options turned off
33: */
34: public int DEFAULT = 0;
35:
36: /**
37: * Pattern "a" matches both "a" and "A".
38: * Corresponds to "i" in Perl notation.
39: */
40: public int IGNORE_CASE = 1 << 0;
41:
42: /**
43: * Affects the behaviour of "^" and "$" tags. When switched off:
44: * <li> the "^" matches the beginning of the whole text;
45: * <li> the "$" matches the end of the whole text, or just before the '\n' or "\r\n" at the end of text.
46: * When switched on:
47: * <li> the "^" additionally matches the line beginnings (that is just after the '\n');
48: * <li> the "$" additionally matches the line ends (that is just before "\r\n" or '\n');
49: * Corresponds to "m" in Perl notation.
50: */
51: public int MULTILINE = 1 << 1;
52:
53: /**
54: * Affects the behaviour of dot(".") tag. When switched off:
55: * <li> the dot matches any character but EOLs('\r','\n');
56: * When switched on:
57: * <li> the dot matches any character, including EOLs.
58: * This flag is sometimes referenced in regex tutorials as SINGLELINE, which confusingly seems opposite to MULTILINE, but in fact is orthogonal.
59: * Corresponds to "s" in Perl notation.
60: */
61: public int DOTALL = 1 << 2;
62:
63: /**
64: * Affects how the space characters are interpeted in the expression. When switched off:
65: * <li> the spaces are interpreted literally;
66: * When switched on:
67: * <li> the spaces are ingnored, allowing an expression to be slightly more readable.
68: * Corresponds to "x" in Perl notation.
69: */
70: public int IGNORE_SPACES = 1 << 3;
71:
72: /**
73: * Affects whether the predefined classes("\d","\s","\w",etc) in the expression are interpreted as belonging to Unicode. When switched off:
74: * <li> the predefined classes are interpreted as ASCII;
75: * When switched on:
76: * <li> the predefined classes are interpreted as Unicode categories;
77: */
78: public int UNICODE = 1 << 4;
79:
80: /**
81: * Turns on the compatibility with XML Schema regular expressions.
82: */
83: public int XML_SCHEMA = 1 << 5;
84: }
|