Do not wait to strike till the iron is hot; but make it hot by striking....
Saral Saxena wrote:Hi Folks,
I have to extract the account # from the barcode that is if LYL01016278572011000000012 is a complete string ,then account No. 100000001
complete barcode LYL01016278572011000000012
account no 100000001
Please advise me how java sply thruough string functionality I can achieve this ...will matcher and regex will help ..!!!
Saral Saxena wrote:
Yeah please suggest me ...I am stuck up at this prblm...!!can we use regex or some other thing..!!
Henry Wong wrote:
Saral Saxena wrote:
Yeah please suggest me ...I am stuck up at this prblm...!!can we use regex or some other thing..!!
What's wrong with using the substring() method as already mentioned?
Henry
Saral Saxena wrote:
Nothing wrong with it ..implementation would be some how as...
But does java 6 offers some other advanced functions also..!!
Henry Wong wrote:
Saral Saxena wrote:
Nothing wrong with it ..implementation would be some how as...
But does java 6 offers some other advanced functions also..!!
Of course, it is possible to use regex, or other advanced techniques to do a substring -- but why?
Henry
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Saral Saxena wrote:
could we use in this case as I want to explore, please it wil be a great help if you can show me how the above code can be done through regex..!! thanks in advance..!!
Henry Wong wrote:
Saral Saxena wrote:
could we use in this case as I want to explore, please it wil be a great help if you can show me how the above code can be done through regex..!! thanks in advance..!!
A bit of a weird request, but why not?
In your code, replace this line....
with this one....
Henry
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |