
February 18th, 2013, 10:31 AM
|
 |
Contributing User
|
|
|
|
|
Please provide more information and an attempt at writing such a program.
As best I can tell you'd have a list of several regular expressions, and the one that matches left-most then longest string is "best". If two expressions match the same length text starting from the same position choose that with the lowest index from the list of patterns. This is a good tool for lexical analysis. You scare me when you say "simple", a word typically used by people hiring programmers to justify low wages.
__________________
[code] Code tags[/code] are essential for python code!
|