Description Usage Arguments Value Note Examples
Coerce an object to regexr
class.
1 2 |
x |
An object to coerce to a |
names |
logical. Should names be included in the |
comments |
logical. Should comments be included in the |
names.above |
logical. Should ames be included above the regex
in the |
comments.below |
logical. Should comments be included below the
sub-expressions in the |
... |
Other arguments passed to |
Returns a dual regexr
and reverse_construct
object.
as.regexr.character
utilizes http://rick.measham.id.au/paste/explain
to break the regular expression into sub-expressions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | library("qdapRegex")
(myregex <- grab("@rm_time2"))
out <- as.regexr(myregex)
out
summary(out)
comments(out)
subs(out)
test(out)
get_construct(out)
## Not run:
## On Windows copy to clipboard
get_construct(out, file="clipboard")
## End(Not run)
## No names & comments behind sub-expressions
myregex2 <- "(\\s*[a-z]+)([^)]+\\))"
get_construct(as.regexr(myregex2, names=FALSE))
get_construct(as.regexr(myregex2, names=FALSE, names.above = TRUE,
comments.below = TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.