Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

question about Regular Expressions - how to find punctuation #534

Open
ziqiangt opened this issue Nov 29, 2018 · 2 comments
Open

question about Regular Expressions - how to find punctuation #534

ziqiangt opened this issue Nov 29, 2018 · 2 comments

Comments

@ziqiangt
Copy link

Hi,

Does anyone know how to find punctuation instead of using [^a-zA-Z]?

Thanks in advance.

@yihaoz
Copy link

yihaoz commented Nov 29, 2018

You can remove all the punctuations using "gsub('[[:punct:] ]+',' ',data)".
https://stackoverflow.com/questions/29098801/removing-punctuations-from-text-using-r

@ziqiangt
Copy link
Author

You can remove all the punctuations using "gsub('[[:punct:] ]+',' ',data)".
https://stackoverflow.com/questions/29098801/removing-punctuations-from-text-using-r

Thanks yihao. This link is very useful!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants