a regular expression literal syntax
Regexp
01 Syntax
SMRUCC.Rsharp.Interpreter.ExecuteEngine.ExpressionSymbols.DataSets.Regexp
02 Methods
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| type | 1 | |
| expressionName | 1 | |
| pattern | 1 |
04 Members
Evaluate(Environment)
just create a new regexp object for run text match
Parameters
| Name | Type | Description |
|---|---|---|
envir | Environment | - |
do regular expression pattern matches
Parameters
| Name | Type | Description |
|---|---|---|
r | Regex | - |
text | Expression | - |
drop | Boolean | controls of the function evaluation result |
env | Environment | - |
Returns
this function returns different result value based on the drop option:
- drop = FALSE, for scalar string value, will returns a character vector that contains all matches result, for multiple string input, this function will returns a list that contains all regexp matches result for each elements string.
- drop = TRUE, for scalar string value, will returns a scalar character string of the first regexp matches result. for multiple string input, this function will returns a character vector which is consist with the every first matches result of the multiple string input, empty string will be placed in the result vector if the corresponding input string element has no matches result.
type
expressionName
pattern
ToString()