#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2010
    Posts
    1
    Rep Power
    0

    Remove #&12345; strings


    dear all,

    does anyone know how i can remove strings like #&876543; with regex in php ?

    the number part in the string is dynamic.

    it would be great to hear from you, and i will appreciate your help a lot!

    arie
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,866
    Rep Power
    6351
    Just remove it?

    PHP Code:
    $theString preg_replace("/#&\d+;/"''$theString); 
    -Dan
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo