For some things, it might help to just use a grammar like BNF. These can be much easier to read than regular expressions. A tool such as GoldParser Builder can then convert the grammar into a parser that does the heavy lifting for you.
ThisThe BNF, EBNF, etc. grammars can be much easier to read and make than a complicated regular expression. GOLD is one tool for such things.
The c2 wiki link below has a few possibilities near the toplist of possible alternatives which can be googled, pluswith some discussion on them included. It is basically a "see also" link to top off my grammar engine recommendation:
http://c2.com/cgi/wiki?AlternativesToRegularExpressionsAlternatives To Regular Expressions
Taking "alternative" to mean "semantically equivalent facility with different syntax", there are at least these alternatives to/with RegularExpressions:
- Basic regular expressions
- "Extended" regular expressions
- Perl-compatible regular expressions
- ... and many other variants...
- SNOBOL-style RE syntax (SnobolLanguage, IconLanguage)
- SRE syntax (RE's as EssExpressions)
- different FSM syntaces
- Finite-state intersection grammars (quite expressive)
- ParsingExpressionGrammars, as in OMetaLanguage and LuaLanguage (http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html)
- The parse mode of RebolLanguage
- ProbabilityBasedParsing...