R package LikeThis adds infix regular expression operators to R that will be
familiar to perl users. The package provides two matching operators: %~%
,
which returns a MatchResultR (which has methods for accessing capture groups), and
%?~%
, which returns a logical and makes capture groups accessible in the local
environment via the .match
list variable. The later can be used iteratively
in a loop to perform progressive matching. The package also provides a substitution
operator, %!~%
.
RegularExpression
, RegExpR-class
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.