What I am trying to do is use part of a field that is filled in by a user to fill in another field. The two examples I am looking at working with are social security numbers and dates.
I have one field that the user inputs the full social security number into. On other pages, I only need the last four digits of the number. Is there a way that this can be done?
My second one is a date that is inputted by the user in a YYYYMMDD format. Some of the pages need each digit added to a single charter block and some of them need a date that takes up two lines, year on top and month date below. Is there a way either of those can be done?
My experience with Java is very limited so I would prefer to be pointed in the direction so I can learn the info over just being given the answer if possible.
What you need is a regular expression. Regular expressions are a very popular tool for parsing strings.
Here's an article on the topic:
But, the string parsing you've mentioned are pretty simple. You could also use simpler sting manipulation operations.
Here's on article on that topic:
Thanks for that, that will teach me not to proof read before I hit submit