in reply to Abusing Regular Expressions

I have half a memory of seeing something written about using regular expressions to solve problems other than string parsing. Can anyone help me out with a link or two?

Abigail(-II)? tends to do things with regex's that aren't plain string parsing (abuse them as you say).

Super Search will undoubtedly turn up more, but here are a couple:
Backtracking through the regex world
Re: permuation algorithm

-enlil

Replies are listed 'Best First'.
Re: Re: Abusing Regular Expressions
by samtregar (Abbot) on Sep 26, 2003 at 22:09 UTC
    here are a couple

    Interesting. Both those examples show ways to use the regex engine to solve problems by creating a regex and then matching it against an empty string just to get the ball rolling. I think my problem will more likely result in a solution like:

    1. Transform schema into a regular expression which will match a correct set of nodes.
    2. Transform document stream into a delimited string form of some kind.
    3. Match schema regex from 1. against string from 2. If the match fails then the document is invalid.

    Can you remember seeing anything like that?

    Super Search will undoubtedly turn up more

    I did try SuperSearch before posting but I didn't find anything useful. What would you suggest I use for search terms?

    -sam