Android Question Need help - Search Routine

tsteward

Well-Known Member
Licensed User
Longtime User
Attached is a spreadsheet. Coumn one is what I need to search.
It is typically Min - Max

A user might type
'S4010' which would return series S4000-S5200
'S900' would return series S1-S2000 & S0001-S1000 & S0001-S2500

Given their is a mixture of characters I have no idea how to create a search routine.
Should I add more columns? Min, Max, Characters allowed.

I have no idea.
 

Attachments

  • CodeSample.pdf
    219.5 KB · Views: 221

eurojam

Well-Known Member
Licensed User
Longtime User
you should make a quiz here in the community for that....I suppose, they will love it and produce a lot of code
 
Upvote 0

eurojam

Well-Known Member
Licensed User
Longtime User
but anyway, you can start with a regex matcher to separate the Strings and numbers...
somthing like "[0-9]+|[A-Z]+" a good way to test your regex is this great tool: http://basic4ppc.com:51042/regex/index.html

brings for the first lines of your column with the above matchstring:
Match (length=1): H
Match (length=1): 1
Match (length=1): H
Match (length=4): 3000
Match (length=1): X
Match (length=4): 8001
Match (length=1): X
Match (length=4): 9000
Match (length=1): S
Match (length=1): 1
Match (length=1): S
Match (length=4): 2000
Match (length=1): X
Match (length=1): 1
Match (length=1): X
Match (length=4): 8000
Match (length=1): G
Match (length=1): 1
Match (length=1): G
Match (length=4): 2377
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…