Regular expression problem
Hello
I have a problem of regular expression. I have a string which contains a pattern of backslash. I also Pattern Syntax of php mannual but i couldnot understand all the meanings and use of * ? ^ and so on.
my string goes like this.
$string = "logLx¿ h:t} c;+Vo dlxnf dL7fdL7f ;kgf lnP/ /fhwfgL cfpâ5g\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ . o;af/] dlxnf cfof]unufotsf ;DalGwt lgsfo;âu jf:tljs tYofà klg 5}g . t/ klg cfkm\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\gf OR5f cfsf+Iff k\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"/f ug{ g;s]/ lg/fz ePsf dlxnfx¿sf] ;+Vof /fhwfgLdf a9\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\g yfn]sf] ;DalGwt If]qsf lj1x¿ atfpâ5g\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ .
/fli6«o dlxnf cfof]usL cWoIf 8f= b\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'uf{ kf]v/]nn] klg /fhwfgLdf dlxnf /f]huf/Lsf] ;d:of lbgâk|ltlbg a9\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\b} uPsf] atfOg\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ . â¦cem aflx/af6 cfpg] dlxnfx¿ o;af6 cem a9L kLl8t 5g\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Ã, pgn] elgg\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ . kf]v/]nn] dlxnf /f]huf/Lsf nflu ;/sf/n] â¦/f]huf/L k/fdz{ s]Gb|à vf]Ng\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'kg] ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'emfj lbOg\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ .
â¦aflx/af6 cfPsf dlxnfx¿sf] JolQmTj ljsf;sf nflu dgf]j}1flgs k/fdz{ s]Gb| klg vf]Ng\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'k5{Ã, pgn] elgg\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\, â¦o:tf s]Gb|df pgLx¿n] ljrf/ cfbfgâk|bfg u5{g\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ . cfkm\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\gf] JolQmTj ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'xfpâbf] /f]huf/ klxrfgsf] df}sf klg kfpâ5g\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ .à cfof]un] klg o:tf s]Gb| :yfkgfsf nflu kxn ul//x]sf] hfgsf/L kf]v/]nn] lbOg\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ .";
and problem is I want to replace all the backslashes with "\\" or "\". can anyone tell me any resource or url related to this broblem or help me please.
Thank you
|