hi all:
I want to count a word in a text file by using as condition the last character and put result into 3 edittext .
if I have for example the word MACNAME(X or Y or Z) which will be parsed from text file .
MACNAMEX
MACNAMEY
MACNAMEZ
the last character is X & Y & Z .
put the result in jedittext :
e1.gettext('count of number of MACNAMEX' );// here is 1
e2.gettext('count of number of MACNAMEY' );// here is 1
e3.gettext('count of number of MACNAMEZ' );// here is 1
I 'm doing GUI application which import text file and count a word by using regx.
I have used scanner method to import text
try (Scanner sc = new Scanner(new File("C:\\MAC.txt"))) {
the REGX used is:
private static String REG ="((?<MACNAME>\\w+)";
how to do that ?
I want to count a word in a text file by using as condition the last character and put result into 3 edittext .
if I have for example the word MACNAME(X or Y or Z) which will be parsed from text file .
MACNAMEX
MACNAMEY
MACNAMEZ
the last character is X & Y & Z .
put the result in jedittext :
e1.gettext('count of number of MACNAMEX' );// here is 1
e2.gettext('count of number of MACNAMEY' );// here is 1
e3.gettext('count of number of MACNAMEZ' );// here is 1
I 'm doing GUI application which import text file and count a word by using regx.
I have used scanner method to import text
try (Scanner sc = new Scanner(new File("C:\\MAC.txt"))) {
the REGX used is:
private static String REG ="((?<MACNAME>\\w+)";
how to do that ?