Class orion.editor.regex
Utilities for dealing with regular expressions.
Defined in: </shared/eclipse/e4/orion/I201309152230/plugins/org.eclipse.orion.client.core/web/orion/regex.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
Utilities for dealing with regular expressions.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
orion.editor.regex.escape(str)
Escapes regex special characters in the input string.
|
<static> |
orion.editor.regex.parse(str)
Parses a pattern and flags out of a regex literal string.
|
Method Detail
<static>
{String}
orion.editor.regex.escape(str)
Escapes regex special characters in the input string.
- Parameters:
- {String} str
- The string to escape.
- Returns:
- {String} A copy of
str
with regex special characters escaped.
<static>
{Object}
orion.editor.regex.parse(str)
Parses a pattern and flags out of a regex literal string.
- Parameters:
- {String} str
- The string to parse. Should look something like
"/ab+c/"
or"/ab+c/i"
.
- Returns:
- {Object} If
str
looks like a regex literal, returns an object with properties
otherwise returns- pattern
- {String}
- flags
- {String}
null
.