1
我正在尋求提取每一次左括號+任意數量的點+關閉括號發生在我的字符串內。grep與R的RNA括號表示
以下是我的R代碼裏面:
pos_test <- "..((((............))))))))))....((........))(((....)))..."
pos_test_matrix <- unlist(strsplit(pos_test, ""))
grep(pos_test_matrix, pattern = "[(]+[.]+[)]")
請指教,grep的返回integer(0)
我想是這樣的:
'gregexpr( 「\\(\\ * \\)。」,post_test)'? – eipi10
我添加了一個截圖來解釋我正在尋找的輸出 – laemtao