java.lang.Object | |
↳ | com.atlassian.jira.util.RegexpUtils |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Equivalent of JDK 1.4's
replaceAll(String, String) , usable in JDK 1.3 | |||||||||||
Convert a wildcard to a java.util.regexp (ie
'*' becomes '.*' and '?' becomes '.' ). |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object |
Equivalent of JDK 1.4's replaceAll(String, String)
, usable in JDK 1.3
str | The string to apply operations to |
---|---|
regex | The regex that str should match |
replacement | String to replace matched string with (using $1, $2 etc for substitutions). |
Convert a wildcard to a java.util.regexp (ie '*'
becomes '.*'
and '?'
becomes '.'
).
Note that this converts wildcards to an exact match, so searching for 'a'
becomes '^a$'
.
Copied from http://www.rgagnon.com/javadetails/java-0515.html
wildcard | A wildcard which can contain '*' and '?' characters |
---|