aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes how to replace string using JS ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to replace string using JS ?" Watch "how to replace string using JS ?" New topic
Author

how to replace string using JS ?

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
how to replace string using JS ?

for example,
var d="iss.classArr[0].components[0].c[1].data";
d.replace("c[1]", "c[0]"); // fail

I try to replace index of c. I want to get "iss.classArr[0].components[0].c[0].data".

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61610
    
  67

Have you checked the APi for the String class?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to replace string using JS ?