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 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
Archived
This topic is now archived and is closed to further replies.