ultrus Posted February 17, 2011 Share Posted February 17, 2011 Hello, I have an odd project where I'm converting HTML from a text editor into SSML to be processed. So far all is good but regex makes my brain explode today. Any thoughts on how to convert something like this: <span class="rcPitchXHigh" title="pitch: x-high" alt="pitch">blah blah</span> into this: <prosody pitch="x-high">blah blah</prosody> using JavaScript? I was thinking about doing this with PHP eventually, but if I can keep it all on the client side, all the better. Thanks much in advance for any pointers big or small. Let me know if I can provide more advanced examples. I'll fill in the gaps if I figure it out first. Best regards, Chris Quote Link to comment https://forums.phpfreaks.com/topic/228003-regular-expressions-in-javascript-convert-one-type-of-tag-to-another-in-string/ 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.