Regular Expression Pattern Matching "State" Object 
Author Message
 Regular Expression Pattern Matching "State" Object

I am looking for a regular expression object\algorithm that does something
like the following:

    1. Initialize  the object with a regular expression pattern.
    2. After initializing the object with a regular expression pattern you
are able to "feed" the object a sequence of characters, one character at a
time, where, after each character is fed to the object, the object indicates
whether or not it is still in a "continuing to match" state, "not a match"
state, or a "match complete" state.  

I am thinking that such a utility may be useful when searching for strings
across DOM nodes for example.

Thanks!

Jeff



Sat, 02 Oct 2004 02:37:20 GMT  
 Regular Expression Pattern Matching "State" Object
Perhaps not exactly what you're looking for, but it may be a good start:

    http://docstring.sourceforge.net/dps/statemachine.py

"A finite state machine specialized for regular-expression-based text
filters"

--

 - python Docstring Processing System: http://docstring.sourceforge.net
 - reStructuredText: http://structuredtext.sourceforge.net
 - The Go Tools Project: http://gotools.sourceforge.net



Sat, 02 Oct 2004 09:26:17 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. "Invert" regular expression matching

2. iss-matching - the free Regular Expression / Pattern Matching cluster

3. Regular Expression for Match Pattern (string) Function

4. Bug in regular expression pattern matching?

5. Regular expression string pattern matching: Embedding pop-11 procedures, and more

6. Pattern-matching regular-expression algorithm?

7. Regular expressions, pattern matching

8. pattern matching using regular expressions

9. "Regular Expression?"

10. Pattern matching using "re"

11. Replace with regular expressions "except if..."

12. Regular expression problem: "|" interferring with ".*?"

 

 
Powered by phpBB® Forum Software