S
Scott Zuyderduyn
Hi all,
I've started planning a software project that utilizes XML to store a lot of
different input from the user. Regular expressions comprise a portion of
this input. I could store a regex as a plain string ("^(\w+)\s+(\d+)$"),
but this assumes POSIX-style regular expressions, and the software
requirements can't neccessarily assume this. Has anyone ever created or
seen an XML spec of a regular expression? For example, something that would
result in:
<regex>
<startAnchor/>
<pattern type="word" minLength="1">
<capture label="Name"/>
</pattern>
<pattern type="whitespace" minLength="1"/>
<pattern type="number" minLength="1">
<capture label="Age"/>
</pattern>
<endAnchor/>
</regex>
Best regards,
Scott
I've started planning a software project that utilizes XML to store a lot of
different input from the user. Regular expressions comprise a portion of
this input. I could store a regex as a plain string ("^(\w+)\s+(\d+)$"),
but this assumes POSIX-style regular expressions, and the software
requirements can't neccessarily assume this. Has anyone ever created or
seen an XML spec of a regular expression? For example, something that would
result in:
<regex>
<startAnchor/>
<pattern type="word" minLength="1">
<capture label="Name"/>
</pattern>
<pattern type="whitespace" minLength="1"/>
<pattern type="number" minLength="1">
<capture label="Age"/>
</pattern>
<endAnchor/>
</regex>
Best regards,
Scott