Allowing underscore in preg_replace

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeddiki
    Contributor
    • Jan 2009
    • 290

    Allowing underscore in preg_replace

    Hello,

    I am using this:
    Code:
    preg_replace( somestuff  (.+?)  somestuff  );
    Does that (.+?) allow the underscore ?
    From my results, I suspect it doesn't

    To include the underscore, do I just add it like: (._+?) ?

    Don't know why but I think this might be wrong.
    Last edited by Niheel; Mar 9 '11, 07:41 PM.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    . also allows the underscore.

    why it doesn’t work in your case I don’t know.

    Comment

    Working...