Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBrett Connolly
12,874 PointsApostrophe type in both the regex and the tweet matters for proper string splitting...
So I just copy and pasted the tweet directly from Craig's Tweet on Twitter (https://twitter.com/craigsdennis/status/558024371424354305) as the second parameter in creating a new Treet in Example.java.
I noticed when the strings were splitting, it was also splitting at the apostrophe in the word "I'll". I realized there are different apostrophe unicodes that will cause the regex to not split properly. The apostrophe in the tweet is: ’ while a single quote is: ' . They may look the same until you zoom your screen in.
Just something to keep in mind when copy and pasting from other pages or manually typing this stuff in yourself. Caused the string to not split properly, for me.