I would just like my string testline(name of string) to break when a $ symbol is pressd instead of new line..any edits...do it plzz...
/*import java.util.Scanner;
import java.util.regex.*;
public class test
{
public static String s;
public static void main(String args[])
{
int i,l,x=0;
String a,c;
String testline;
Scanner br=new Scanner(System.in);
testline=br.next();
Pattern pattern = Pattern.compile("[0-1]+");
Matcher matcher = pattern.matcher(testline);
while (matcher.find()) {
s=matcher.group();
for(i=0;i<s.length();i=i+4)
{
c=s.substring(i,i+4);
testline=binary(c,testline);
}
}
testline=testline.replaceFirst("Input", "Output");
System.out.print(testline);
}
public static String binary(String s,String testline)
{
int i = Integer.parseInt(s, 2);
String t="";
t=t.valueOf(i);
//System.out.println(t);
testline=testline.replace(s, t);
return testline;
}
}
*/