find_parenthesis {evalR} | R Documentation |
This function will search for the first block of parenthesis and return it if found. Otherwise, it will return "".
find_parenthesis(text)
text |
the string/code/statement you want to parse. |
a substring. Either "" or the first parenthesis block.
# returns ""
find_parenthesis("3 + 5")
# returns "(3 + 5)"
find_parenthesis("2 * (3 + 5)")