Skip to content
Prev 314805 / 398503 Next

pattern matching

On Jan 7, 2013, at 3:22 PM, Data Analytics Corp. <walt at dataanalyticscorp.com> wrote:

            
The problem with this specific example is that '$' is a metacharacter in regular expressions, so you have to escape it. For example:
[1] 2
attr(,"match.length")
[1] 1
attr(,"useBytes")
[1] TRUE



See ?regex for more information and if appropriate, consider gregexpr():
[[1]]
[1]  2 12
attr(,"match.length")
[1] 1 1
attr(,"useBytes")
[1] TRUE


Regards,

Marc Schwartz