Mahngiel Posted September 10, 2012 Share Posted September 10, 2012 JSFiddle >> http://jsfiddle.net/Mahngiel/gfjfv/ I'm writing a plugin for a multi-lang app, where certain list elements are translated. Accordingly these elements are written into the element with document.write(Var). Now, in the same list element, there is a number pertaining to said var wrapped in parenthesis that i'm trying to remove. Examples: All: (10) White: (3) et al My hack regex-fu works for elements that are not language-driven, but when it comes to the ones with embedded script tags, the entire page is being replaced. I understand why this is happening, but I need a viable solution. Any help appreciated! Link to comment https://forums.phpfreaks.com/topic/268221-string-replacement-with-embedded-script-tags/ Share on other sites More sharing options...
Mahngiel Posted September 10, 2012 Author Share Posted September 10, 2012 Heh. if you're interested, the comments are in the fiddle. http://jsfiddle.net/Mahngiel/6PakQ/1/ Link to comment https://forums.phpfreaks.com/topic/268221-string-replacement-with-embedded-script-tags/#findComment-1376771 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.