These days, I'm busying developing an online WebFormDesigner for our workflow product GFlow, using DHTML & JScript. It looks somewhat like the Visual Studio IDE:) Let's take a peek at it:
The following is a regular expression used to match the customized SPAN tag, which has an 'id' attribute and a 'GfControl' attribute set to true, to represent a GFlow control:
<span(?:\s[\s\S]*?)??\sid=(\w+)(?:\s[\s\S]*?)??\sGfControl=(?:"true"|'true'|true)(?:\s[\s\S]*?)??>
(<span(?:\s[\s\S]*?)??>[\s\S]*</span>|[\s\S]*?)*
</span>
So powerful RegularExpression can be! I have to spend some more time to learn it well:)