Usage of Regular Expression g in javascript

     In regular expression g is used for global search. If you not use this g that expression only search and find with the first match. More details shown in the following example.



     str.replace(/s/g,"#");


Example Program:- (Editor)


Editor is Loading...

Advertisement

Nhận xét

Bài đăng phổ biến từ blog này

How to set the SDK, NDK and JDK path to android studio?

if statement

Select all values from list box in a single click using javascript