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?
Recognizing $
-
- Participant
- Posts: 16
- Joined: Thu Apr 03, 2008 9:45 am
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.
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.