Here is a Codepen version。 我的目標是遍歷數組的元素,搜索匹配[email protected]的東西@~,刪除標識匹配的那些「書擋」,然後.join()數組。在下面的例子中,結果應該看起來像a/b/c。 但是相反,我得到的結果a/[email protected]@~/c。爲了讓事情更加令人困惑,當我顛倒數組元素的順序時,問題結果從[email protected]@~
我有一個包含從不同的語言,如字符字符串: en <chars in english> fr <chars in french> es <chars in spanish>
我需要從上面的字符串中提取只是在特定語言的字符串。我如何使用正則表達式或python2.6中的其他工具? ps。它可能是不同的順序,如:en(。)es(。)it(。*),問題是es或fr或它 - 不在拉丁字符集中, - 這就
re.findall(r'((([0-9]|[a-z]|[A-Z]){5,8},)*([0-9]|[a-z]|[A-Z]){5,8} reporting and syncing)', 'johnny, joda89 reporting and syncing heyff, jkojo, jkjkjdf, 2378a reporting and syncing and a lot of other
我想在某些書名字符串周圍添加括號,並且希望能夠使用paste0函數粘貼。我想利用這個字符串: a <- c("I Like What I Know 1959 02e pdfDrama (amazon.com)", "My Liffe 1993 07e pdfDrama (amazon.com)")
包的特定字符串括號: a
[1] 「I Like What I Know (1959) (02