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! Quote 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/ Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.