Start a new topic

Expression For An Amount Range?

We currently have a dictionary created for ratings - but the ratings have changed and we'd like to do a dictionary that has expressions that will do amount ranges.  Ex: $14,999 - will covert into the Rating for $9,999-$25,000.  I haven't used Expressions yet and was wondering if this is possible?

 

Thanks for any/all help and guidance - much appreciated.

 

Sue

1 Comment

I don't have IOM in front of me now but if I remember correctly you have to use a pattern that matches the number of characters and limits the range of what those numbers can be. For 10,000 to 24,999 for example it would be something like:

\b(1[0-9][0-9][0-9][0-9]|2[0-4][0-9][0-9][0-9])\b

The way this works is that the first part 1[0-9][0-9][0-9][0-9] would match 10000 to 19999 and the second part 2[0-4][0-9][0-9][0-9] would match 20000 to 24999

You could add the $ and , characters in there as well if they were being imported.

The other alternative is a lot simpler but requires some programming knowledge. You could make a function that could calculate the range based on the numbers and output some identifier like "A" for the first range, "B" for the second and so on, then make a dictionary that maps "A" to "$1-$999" and "B" to "$1,000-$9,999" etc.

Hope that helps


Login or Signup to post a comment