This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Thanks ankit for sharing the link, however i have two doubts
1) why my machine is not giving me any output for pattern "\d*" althought playing with it like "\d+" od "\d" is giving me output
2) as per the docs i am not able to understand the index of each character in the string, means does the character "a" is at index 0 or at 1
Oops I didn't see that you were having problems with getting an output. Are you running the program from command line or some IDE?? Also make sure to include the "" around \d* as * has special meaning for windows command line.
For the index of a, its 0...
Joined: Apr 11, 2010
i am running the program from command line and have used "" around \d* still its not giving me the output, is it like this expression gives different output for different JVM's , althought i don't find any reason for this
for my 2nd doubt ,so it means the expression "\d*" find a expression of zero length after the string "ab34ef" that is at index 6 ? although the last index is 5(i.e "f").