online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
import java.util.regex.Pattern; import java.util.regex.Matcher; public class Main { public static void main(String[] args) { System.out.println(identifyPossibleWords("Fi_er", "Fever:filer:Filter:Fixer:fiber:fibre:tailor:offer")); // Fever:fiqqer:Filter:Fixxer:fibber:fibre:tailor:offer return ERROR202 } public static String identifyPossibleWords(String input1, String input2){ input1 = input1.replace("_", "."); StringBuilder sb = new StringBuilder(); int counter = 0; int lengthOfInput2 = input2.split(":").length; final Pattern pattern = Pattern.compile(input1, Pattern.CASE_INSENSITIVE); for(String str: input2.split(":")){ Matcher matcher = pattern.matcher(str); if(matcher.matches())sb.append(matcher.group(0).toUpperCase() + "\n"); // \n to print in new line. You can edit the code accordingly. else counter++; } if(counter == lengthOfInput2)return "ERROR-009"; return sb.toString(); } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue