I'm pretty new to this, so excuse me if my question isn't that clear. I'm pulling an RSS Feed into Yahoo Pipes and using Regex to modify it. Here's what I'm trying to do:
- Limit the number of characters in an entry, but...
- Make sure the item includes complete words, and...
- If the item is shortened, add an ellipses, but...
- If it falls within the limits nothing should be done to it
So, if a feed's Title is: "This article is important" and the limit is 20 characters, the result should be "This article is..." But if the Title is "Good Article," nothing should happen to it.
After doing some research I think that I want to combine an if/then statement with lookahead, i.e. go to the character limit and if there is a character following it that is a space, add an ellipses, if it is a number or letter, go to the final space within the limit and add an ellipses, but if there isn't any character following it, don't do anything. Does this make sense? Is there an easier way to do what I'm going for?
I would really appreciate any help you could provide. Thanks!