Quantcast
Channel: ARIS BPM Community - Recent forum posts
Viewing all articles
Browse latest Browse all 1616

RegEx - Strip HTML from text

$
0
0

Hello Everyone,

I've been trying to clear a string from the HTML tags contained in it. Below is the code, I tried:

var oRegExp =  new RegExp('/]+(>|$)/', 'g');
retrievedExtDesc = retrievedExtDesc.replace(oRegExp, '');

But this is the error, I get:

I tried using double quotation marks also. I tried removing the single quotation mark from the letter g in the RegExp constructor, but that did not help - I get another error - g not recognised or something, if I do that.

I'd appreciate any suggestions. Thanks!
 


Viewing all articles
Browse latest Browse all 1616

Trending Articles