Description Usage Arguments Value Examples
this function performs as str_which (no \n in pattern). If there is \n in pattern, the function will try to match corresponding continuous line and return index of the last line matched.
1 | multi_line_map(string = NULL, pattern = NULL)
|
string |
string. input string to match with. array with each element for a line. must be provided |
pattern |
string. the pattern to find. \n is in the pattern. must be provided |
array. the index location for the last line of the matching block
1 2 3 4 5 6 7 | string=c("aabb","cc","eeab","ce")
pattern="b\\nc"
multi_line_map(string=string,pattern=pattern)
pattern="eea"
multi_line_map(string=string,pattern=pattern)
pattern="eea\\n"
multi_line_map(string=string,pattern=pattern)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.