well, if we just put | sign in between the expression (14203|121870″
the two matches are :14203
Test Target String matches()replaceFirst()replaceAll()lookingAt()find()n [start),endn)] group(n)
1 21870 No 21870 21870 No No
2 1045814203 No 10458 10458 No Yes 0: [5,10] 14203
3 21870 No 21870 21870 No No
4 10458 21870 21870 No 10458 21870 21870 10458 21870 21870 No No
5 27522 14203 21870 No 27522 21870 27522 21870 No Yes 0: [6,11] 14203
How are these answers derived?
0
0
(14203|21870) Is there supposed to be a pipe “|” between the 14203 and 21870?
And a space between 10458 and 14203?
0
0
looking into it all shall be failed….
http://www.regexplanet.com/advanced/java/index.html
but if u put | in between then different answer…
0
0
well, if we just put | sign in between the expression (14203|121870″
the two matches are :14203
Test Target String matches()replaceFirst()replaceAll()lookingAt()find()n [start),endn)] group(n)
1 21870 No 21870 21870 No No
2 1045814203 No 10458 10458 No Yes 0: [5,10] 14203
3 21870 No 21870 21870 No No
4 10458 21870 21870 No 10458 21870 21870 10458 21870 21870 No No
5 27522 14203 21870 No 27522 21870 27522 21870 No Yes 0: [6,11] 14203
0
0