Jump to content


ereg_replace script remove backslash for search \141 to result a

  • Please log in to reply
2 replies to this topic

#1 dub27

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 04 March 2006 - 05:04 PM

I have searched and searched and tried and tried...

Can anyone provide assistance with a script as follows:

PHP code
Search and Replace using ereg_replace
Search on '\141' that is with a backslash in the search variable
Result to 'a' that is alphanumeric replacement

The ereg_replace is removing the backslash in the search retrieval but is placing a backslash in the search replace e.g. '\a'

I have tried using single quotes, double quotes, many variations but cannot find a reg_replace expression to remove the backslash and not include in the result search.

Any help would be very much appreciated.


#2 Hooker

  • Members
  • PipPipPip
  • Advanced Member
  • 193 posts
  • LocationWales, UK

Posted 04 March 2006 - 05:23 PM

have you tried working with:
instead? it sounds like it'd be perfect for you.

#3 dub27

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 06 March 2006 - 10:17 AM

Thank you for your help... yes, tried stripslashes...

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users