theBioBucket-Archives | R-Code used in my blog theBioBucket | Blog library
kandi X-RAY | theBioBucket-Archives Summary
kandi X-RAY | theBioBucket-Archives Summary
R-Code used in my blog theBioBucket
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of theBioBucket-Archives
theBioBucket-Archives Key Features
theBioBucket-Archives Examples and Code Snippets
Community Discussions
Trending Discussions on theBioBucket-Archives
QUESTION
I'm looking at this tutorial for using RegEx with stringr
. Using the below example:
ANSWER
Answered 2018-Mar-08 at 04:28It looks like what you're doing is right and there is in fact a mistake in the tutorial. I tested the regex too, you can see it here. What the regex you are given is capturing any uppercase letter that may or may not be followed by a dot. For instance, "W." in "George W. Bush" is substituted with "W", but "i.e." is not captured and substituted because none of the characters are capitalized. If we had "I.E." it would get substituted with "IE". In order to capture the names given we need a different regex. One approach might be to capture the first name, middle initial, and last name. Now you could get the effect with the regex .*([A-Z][a-z]+)\s([A-Z])[.]+\s([A-Z][a-z]+).*
see here or in R using
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install theBioBucket-Archives
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page