5 ms·
sooo... Counter(re.findall(r"[^a-zA-Z]([a-zA-Z]+)[^a-zA-Z]",requests.get("http://blog.getbootstrap.com/2013/02/07/bootstrap-2-3-released/ http://blog.getbootstr
by phoobahr 14y ago
sooo...
Counter(re.findall(r"[^a-zA-Z]([a-zA-Z]+)[^a-zA-Z]",requests.get("http://blog.getbootstrap.com/2013/02/07/bootstrap-2-3-released/ http://blog.getbootstrap.com/2013/02/07/bootstrap-2-3-releas...).content.lower()))
I see one occurrence of 'shit'. I'm not sure how I feel about your pansy ass semi-outrage of someone else's release page language.
Oh, wait. I feel nothing, approximately what this entire conversation thread is worth.
- blowski 14y agoCtrl + F shows two. Time to update your regex-fu, or use simpler tools.
- lengads 14y agore.findall() returns all non-overlapping matches. We need to use a positive lookahead on the third part of the pattern to stop it from consuming the non-character: re.findall(r"[^a-zA-Z]([a-zA-Z]+)(?=[^a-zA-Z])", ..)
- instakill 14y agoIf my comment seemed like a semi-outrage then you sir/madam are a very sensitive person.
- mjohn 14y agoLove the use of Counter & requests, but you get 76 li elements with your regex - one of which contains another occurance.