Jump to content

HubertCumperdale

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

HubertCumperdale's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Actually, the second one is better... never know what char may be at the end of a word: . : ; ? - * etc.....
  2. Used the first one, works great.... thanks!
  3. I have to admit that regex is something that always sends me crosseyed.... one day I will get my head around it. I have a small piece of code that is used to create hyperlinks for things like #Facebook from a Twitter RSS feed. It works ok, however sometimes we get: #Facebook, or #Facebook: or #Facebook. What I would like is to also remove these common end characters such a commas, colons and periods. This is the code I currently have: $description = preg_replace("/#([^ ]+)/", "<a href=\"https://twitter.com/#!/search/%23$1\">#$1</a>", $description); Any help appreciated!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.