View Full Version : explain Can anybody suggest me in programming...
yuga r
12-31-2007, 04:59 AM
...STRING TOKENIZER CLASS-Core Java for the example of.? validate Ip address ,4 bytes of String each sepated by and the value of each byte is between 0-255 by using String Tokenizer class.for example 10.15.9.99 is valid and 10.256.01.99 is invalid.i am asking programming for this question?
Panther K
12-31-2007, 06:59 AM
What you are need here is a regular expression. String tokenizer would also work but in that case you would have to do much of the thinking.
See this example, it is exactly what you need :)
http://www.java2s.com/Code/Java/Regular-Expressions/PositiveLookahead.htm
Still want to use tokenizer, read this
http://exampledepot.com/egs/java.util.regex/Tokenize.html
vBulletin® v3.6.8, Copyright ©2000-2012, Jelsoft Enterprises Ltd.