• Home
  • Flailing Wildly
  • Résumé
  • Design
  • Code
  • Wishlist
  • About Me

Flailing Wildly
Too much straw, not enough camel.

SimplePie… Mmmm, Yummy!

by Ryan Parman • September 21, 2004 • Code, Projects, Syndication, Technology • 1 comments

I finally cracked the nut on the problem I was having with SimplePie. The compatibility fix I’ve been working on finally works for the two feeds that I was having a problem with. Thanks to Mark IJbema for nudging me in the right direction.

The downside is that it slowed SimplePie down a bit. I think that it’s something I’ll let slide for this version, and try to tackle it for the next. I still need to go back through the list of 300+ feeds to make sure I haven’t broken something else, but assuming that all goes well, I’ll post SimplePie 0.94 sometime tonight or tomorrow.

I hope you all are using it, or are planning to use it. It’s good software, really… and no, I’m not trying to float my own boat. If you find any bugs or would like to see something added, let me know.

Ryan Parman

Ryan Parman is an entrepreneur, open source evangelist and passionate usability advocate currently living in Seattle. He is the founder and visionary behind SimplePie and CloudFusion, co-founder of WarpShare, member of the RSS Advisory Board, and creator of the AWS SDK for PHP. Ryan's aptly-named blog, Flailing Wildly, is where he writes about ideas longer than 140 characters.

« One Million and Counting…
It Took Me Long Enough… »

Discussion

Mark IJbema

September 22, 2004

I just realised my first regex wasn’t totally correct, or maybe it is for what you want . But it wouldn’t match <tag attr=”/”/> for example, so to match all selfenclosing tags this would be more correct:

<[^>/]+((“[^"]*”)|(‘[^']*’)|([^>/]*))/>

this matches all characters within quotes, including greater then and slash, also if you want to be really correct you should match ” within ” and ‘ within ” and ‘ as well, so that would become:

<[^>/]+((“([^"\]|\.)*”)|(‘([^'\]|\.)*’)|([^>/]*))/>

That should work (untested though). One advice on regexes, write testcases (actually that goes for all software development, but with regexes it really helps a lot). An easy way is to have something like a php script with a function which takes a string and a boolean indicating wether it should validate. The function checks the string against the regex, and then gives feedback (something like ‘the string validated while it shouldn’t: [string]‘). It’s also a great way to experiment with new regular expressions, while maintaining a lot more integrity.

 

Comments for this post are now closed.

Blog search

Archives
  • 2012 (4)
  • 2011 (27)
  • 2010 (9)
  • 2009 (7)
  • 2008 (12)
  • 2007 (8)
  • 2006 (18)
  • 2005 (57)
  • 2004 (104)
  • 2003 (103)
Categories
  • Apple (49)
  • Browsers (56)
  • Clueless Recruiters (5)
  • Code (58)
  • Community (1)
  • Creating Websites (31)
  • Culture (2)
  • Design (5)
  • Digital Media (6)
  • Family Life (12)
  • Just for Fun (26)
  • Law (1)
  • Life Lessons (2)
  • Music (5)
  • Notable Quotes (1)
  • Personal (34)
  • Political (14)
  • Projects (47)
  • Software (63)
  • Syndication (28)
  • Technology (81)
  • The Hiring Process (1)
  • Tutorials (8)
  • TV and Movies (16)
  • Video Games (5)
  • Website (62)
  • Work and Business (7)
  • Writing (4)
Socially-aware

Twitter • Facebook • YouTube • Yelp! • Flickr • Instagram • Zerply • LinkedIn • Last.fm • Spotify • Rdio • Pinboard • gdgt

Claim to fame
  • Amazon Web Services
  • WarpShare
  • CloudFusion
  • SimplePie
Legal mumbo-jumbo

All ideas, opinions and comments I post are my own and are in no way affiliated with anybody I work with. If you quote and/or reprint something I've written or said, please direct folks back to this site as a form of attribution. I promise I'll do the same for you. Unless otherwise noted, all content on this site is copyright © 1979–2011 Ryan Parman.

Powered by Rocket Sauce. A Ryan Parman production.