How To User Javascript Regex - Split String Without Losing Data And Format The Paragraph
i have the following paragraph. Now i want to manage the string in the following and i want to break the line if (1), (2) such condition occur or a specific string Exception will o
Solution 1:
var str = '(1)point 1 (2) point2 exception: some exception (3) point 3'
str = str.replace(/(\(\d+\)|exception\s*\:)/gi, "<br />$1");
Post a Comment for "How To User Javascript Regex - Split String Without Losing Data And Format The Paragraph"