Topic
  • 3 replies
  • Latest Post - ‏2008-04-29T21:49:58Z by SystemAdmin
SystemAdmin
SystemAdmin
533 Posts

Pinned topic Recognizing $

‏2008-04-29T20:06:48Z |
I'm writing rules that recognize currency (American only, for now). So far, I have two rules that recognize the $ at both the beginning and the end of the input. Yes, some of the entries have the $ at the end.

Right now, I have the $ in the SEPLIST so that it is pulled out and turned into a separate token. I tried numerous variations with it not listed in SEPLIST, but none of those worked for all of the tests.

I'm trying to nullify the $ token, but set a flag so that it can be PREFIXed to the output later.

Any hints as to how I could do this?
Updated on 2008-04-29T21:49:58Z at 2008-04-29T21:49:58Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    533 Posts

    Re: Recognizing $

    ‏2008-04-29T20:49:26Z  
    Addition:

    With the $ added to SEPLIST, the pattern I get for $1000 is $^. Obviously, I cannot simply use $ to match it, since that is the end of field specifier. I tried \$, but it is still seen as $ for some reason. I can use ~ for $1000 but not 1000$. 1000$ currently get recognized as ^$.

    If I take $ off of SEPLIST, $1000 and 1000$ give me ~ and > respectively. Can I use a substring with ~? If so, then I might be able to use ~ and > to get the values.
  • SystemAdmin
    SystemAdmin
    533 Posts

    Re: Recognizing $

    ‏2008-04-29T21:01:38Z  
    That did indeed work.
  • SystemAdmin
    SystemAdmin
    533 Posts

    Re: Recognizing $

    ‏2008-04-29T21:49:58Z  
    That did indeed work.
    mdemerick can you email me directly at sbhanna@us.ibm.com

    I would like to ask a few direct questions.

    Regards

    Stewart Hanna