Description Usage Arguments Details See Also Examples
Show JS-style regex pattern in an htmlwidget.
1 |
pattern |
a pattern string |
width |
the widget width |
height |
the widget height |
Most parts of RE2 regex syntax are supported, except for some special Unicode character classes.
https://regexper.com/documentation.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Skip on CRAN
## Not run:
# US ZIP code
show_regex("[0-9]{5}(?:-[0-9]{4})?")
# Email
show_regex("\\b[a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}\\b")
# Hex value
show_regex("#?([a-f0-9]{6}|[a-f0-9]{3})")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.