EVOLUTION-MANAGER
Edit File: delimMatch.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Delimited Pattern Matching</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for delimMatch {tools}"><tr><td>delimMatch {tools}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Delimited Pattern Matching</h2> <h3>Description</h3> <p>Match delimited substrings in a character vector, with proper nesting. </p> <h3>Usage</h3> <pre> delimMatch(x, delim = c("{", "}"), syntax = "Rd") </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>a character vector.</p> </td></tr> <tr valign="top"><td><code>delim</code></td> <td> <p>a character vector of length 2 giving the start and end delimiters. Future versions might allow for arbitrary regular expressions.</p> </td></tr> <tr valign="top"><td><code>syntax</code></td> <td> <p>currently, always the string <code>"Rd"</code> indicating Rd syntax (i.e., <span class="samp">%</span> starts a comment extending till the end of the line, and <span class="samp">\</span> escapes). Future versions might know about other syntax, perhaps via ‘syntax tables’ allowing to flexibly specify comment, escape, and quote characters.</p> </td></tr> </table> <h3>Value</h3> <p>An integer vector of the same length as <code>x</code> giving the starting position (in characters) of the first match, or <i>-1</i> if there is none, with attribute <code>"match.length"</code> giving the length (in characters) of the matched text (or <i>-1</i> for no match). </p> <h3>See Also</h3> <p><code><a href="../../base/html/grep.html">regexpr</a></code> for ‘simple’ pattern matching. </p> <h3>Examples</h3> <pre> x <- c("\\value{foo}", "function(bar)") delimMatch(x) delimMatch(x, c("(", ")")) </pre> <hr /><div style="text-align: center;">[Package <em>tools</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>