java Error in reading

431
March 04, 2017, at 1:39 PM

heres my code

String a = "|--> ";
String b = " <--|";
String wordfind;
File pal = new File("palringo.exe");
try {
    Scanner word = new Scanner(pal);
    Pattern tag = Pattern.compile("|-->(.+?)<--|");
     wordfind = word.findInLine(tag);
     Matcher matcher = tag.matcher(wordfind);
    while(matcher.find()){
    wordfind=wordfind.replaceAll(a, "").replaceAll(b, "");
    }
    PrintWriter writer = new PrintWriter(pal);
    writer.print(wordfind);
} catch (FileNotFoundException e) {

the input in palringo.exe is this
|--> example <--|
the output my project should print the word(in palringo..exe) like this :

example

what im doing wrong ?

Rent Charter Buses Company
READ ALSO
How to set the text of a TextView to the content of a selected item on a spinner?

How to set the text of a TextView to the content of a selected item on a spinner?

I'm trying to get the value of the selected item into a TextView, and i want it to change each time the selected item change! I've try to get the position of the selected item into a string then set the text of the TextView equal to this same string but no sucess...

381
Cannot set Boolean value through reflection

Cannot set Boolean value through reflection

I am not able to set a Boolean value to a field using java reflectionThe field data type is java

595
Inherit a class with a getter/setter method in Java

Inherit a class with a getter/setter method in Java

i have a super newbie question

457
Java Applet Battleships [on hold]

Java Applet Battleships [on hold]

I have started making a java applet for a game like battleshipsHere is what I am trying to do:

377