4 ms·
I could imagine a Jquery-like DSL where something like /^[A-Z]+[0-9]{2}$/ could be expressed like Match(str).BeginsWith().BigCaseAlpha().AtLeastOne().Numeric().
by itmag 14y ago
I could imagine a Jquery-like DSL where something like /^[A-Z]+[0-9]{2}$/ could be expressed like Match(str).BeginsWith().BigCaseAlpha().AtLeastOne().Numeric().FixedLength(2).EndsWith()
Of course, you would also have to be able to nest these for more advanced matching...
Is there something like this already in existence? :)
- eurleif 14y agoHow about pyparsing? http://pyparsing.wikispaces.com/ http://pyparsing.wikispaces.com/