railo.runtime.regex
Class Perl5Util
java.lang.Object
railo.runtime.regex.Perl5Util
public final class Perl5Util
- extends Object
Method Summary |
static Struct |
find(String strPattern,
String strInput,
int offset,
boolean caseSensitive)
find occurence of a pattern in a string (same like indexOf), but dont return first ocurence , it return
struct with all information |
static int |
indexOf(String strPattern,
String strInput,
int offset,
boolean caseSensitive)
return index of the first occurence of the pattern in input text |
static void |
main(String[] args)
|
static Array |
match(String strPattern,
String strInput,
int offset,
boolean caseSensitive)
|
static String |
replace(String strInput,
String strPattern,
String replacement,
boolean caseSensitive,
boolean replaceAll)
replace the first/all occurence of given pattern |
Perl5Util
public Perl5Util()
indexOf
public static int indexOf(String strPattern,
String strInput,
int offset,
boolean caseSensitive)
throws org.apache.oro.text.regex.MalformedPatternException
- return index of the first occurence of the pattern in input text
- Parameters:
strPattern
- pattern to searchstrInput
- text to search patternoffset
- caseSensitive
-
- Returns:
- position of the first occurence
- Throws:
org.apache.oro.text.regex.MalformedPatternException
find
public static Struct find(String strPattern,
String strInput,
int offset,
boolean caseSensitive)
throws org.apache.oro.text.regex.MalformedPatternException
- find occurence of a pattern in a string (same like indexOf), but dont return first ocurence , it return
struct with all information
- Parameters:
strPattern
- strInput
- offset
- caseSensitive
-
- Returns:
-
- Throws:
org.apache.oro.text.regex.MalformedPatternException
match
public static Array match(String strPattern,
String strInput,
int offset,
boolean caseSensitive)
throws org.apache.oro.text.regex.MalformedPatternException
- Throws:
org.apache.oro.text.regex.MalformedPatternException
replace
public static String replace(String strInput,
String strPattern,
String replacement,
boolean caseSensitive,
boolean replaceAll)
throws org.apache.oro.text.regex.MalformedPatternException
- replace the first/all occurence of given pattern
- Parameters:
strInput
- text to search patternstrPattern
- pattern to searchreplacement
- text to replace with patterncaseSensitive
- replaceAll
- do replace all or only one
- Returns:
- transformed text
- Throws:
org.apache.oro.text.regex.MalformedPatternException
main
public static void main(String[] args)
throws org.apache.oro.text.regex.MalformedPatternException
- Throws:
org.apache.oro.text.regex.MalformedPatternException
Copyright © 2012 Railo