2

I have some structured text. I want to identify if a value is a number, date, spatial coordinate, plain text, uri etc. I can of course write my own solution.

But I was wondering if there is a solid library out there that would do all this and maybe more. Dates are a particular hassle they can be written so many ways all of which are legitimate.

For numbers there is ...commons.lang.math.NumberUtils.isNumeric()

Something similar for the others would be helpful.

Ankur
  • 50,282
  • 110
  • 242
  • 312
  • 1
    There will be lots of workable solutions, just wondering if there's a particularly elegant solution. – Ankur Jul 11 '11 at 09:39
  • 1
    Related question about parsing dates http://stackoverflow.com/questions/3850784/recognise-an-arbitrary-date-string – Joel Jul 11 '11 at 10:00
  • 1
    @Ankur, You have almost 100 questions without an accepted answer. Perhaps you can try to ask questions which can be answered or follow up answers so they can be accepted. – Peter Lawrey Jul 11 '11 at 10:24
  • @Joel thanks that will be useful for the dates. – Ankur Jul 12 '11 at 10:06
  • 1
    @Peter, I will go through and accept answers. I think the time difference means that I may ask a question and then have to go to sleep and work, and it will often be 16-24 hours before I can take another look, in that time if there is a question/comment I can't really respond. – Ankur Jul 12 '11 at 10:08

0 Answers0