[MEMO] A RegularExpression used to match the customized HTML tags for GFlow Controls:)

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:
[MEMO] A RegularExpression used to match the customized HTML tags for GFlow Controls:)


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:)

你可能感兴趣的:(express)