Replacing characters using php

Discussion in 'Javascript' started by kiran, Jul 4, 2006.

  1. kiran

    kiran Guest

    hi,
    i have retrieved path like below line
    C:\\\\Program Files\\\\xyz\\\\

    how can remove the unnecessary \ from the above line . i have used all
    the functions available. if anyone knows about it kindly let ma know
     
    kiran, Jul 4, 2006
    #1
    1. Advertising

  2. kiran

    frizzle Guest

    kiran wrote:
    > hi,
    > i have retrieved path like below line
    > C:\\\\Program Files\\\\xyz\\\\
    >
    > how can remove the unnecessary \ from the above line . i have used all
    > the functions available. if anyone knows about it kindly let ma know


    You are aware this is the javascript group?

    Anyways,
    $string = preg_replace( '/\\\\+/', '\\', $string );
    should help you.

    Frizzle.
     
    frizzle, Jul 4, 2006
    #2
    1. Advertising

  3. JRS: In article <>
    , dated Tue, 4 Jul 2006 04:23:45 remote, seen in
    news:comp.lang.javascript, frizzle <> posted :
    >
    >You are aware this is the javascript group?


    It is a javascript group. There are several others, including no., fr.,
    de., it.; and there is at least one Jscript group.

    --
    © John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
    <URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
    <URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
    <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
     
    Dr John Stockton, Jul 4, 2006
    #3
  4. kiran

    frizzle Guest

    Dr John Stockton wrote:
    > JRS: In article <>
    > , dated Tue, 4 Jul 2006 04:23:45 remote, seen in
    > news:comp.lang.javascript, frizzle <> posted :
    > >
    > >You are aware this is the javascript group?

    >
    > It is a javascript group. There are several others, including no., fr.,
    > de., it.; and there is at least one Jscript group.
    >
    > --
    > © John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
    > <URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
    > <URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
    > <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.


    Smartpants. I wanted to point out this wasn't the PHP-group. Nor _any_
    PHP group.

    Frizzle.
     
    frizzle, Jul 5, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. BenO
    Replies:
    0
    Views:
    358
  2. Ted Zeng
    Replies:
    4
    Views:
    512
    Tim Arnold
    Oct 3, 2006
  3. Ted Zeng
    Replies:
    0
    Views:
    635
    Ted Zeng
    Oct 13, 2006
  4. Rajive Narain
    Replies:
    0
    Views:
    1,890
    Rajive Narain
    Sep 18, 2009
  5. Rob Meade

    Replacing - and not Replacing...

    Rob Meade, Apr 5, 2005, in forum: ASP General
    Replies:
    5
    Views:
    281
    Chris Hohmann
    Apr 11, 2005
Loading...

Share This Page