Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2010
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Replace the string using regular expression

    Hi Guys....


    I have a word like this

    web developer, php is serverside.

    have to change
    php is good server.



    please help me in javascript ...............

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    Quote Originally Posted by anandselvaraj View Post
    Hi Guys....


    I have a word like this

    web developer, php is serverside.

    have to change
    php is good server.



    please help me in javascript ...............
    Code:
    <script type="text/javascript">
    
    function phpsigood(txt_str){
    var bb = txt_str.split(" ")
    var cc = "is good server."
    alert(bb[1]+cc)
    }
    
    window.onload = phpisgood("web developer, php is serverside.")
    </script>


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •