#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    1
    Rep Power
    0

    Help me with this SIMPLE Program


    Design a regular expression evaluator and reply to the user query by matching it with a best Regular expression using PYTHON
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,850
    Rep Power
    481
    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 and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo