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
not currently supported as it utilized
'http://rick.measham.id.au/paste/explain', however this website appears not
to be operational. This functionality may return if the website is again
available or if a suitable replacement regex parser is found.
If you have a suggested web based parser please make a suggestion via: https://github.com/trinker/regexr/issues.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
## NOTE: These examples will likely fail unless
## http://rick.measham.id.au/paste/explain becomes available again.
library("qdapRegex")
(myregex <- grab("@rm_time2"))
out <- as.regexr(myregex)
out
summary(out)
comments(out)
subs(out)
test(out)
get_construct(out)
## On Windows copy to clipboard
get_construct(out, file="clipboard")
## 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))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.