Skip to content

Instantly share code, notes, and snippets.

@sreelallalu
Created November 1, 2017 06:33
Show Gist options
  • Select an option

  • Save sreelallalu/f26263ddaca57445d61a2eb40fc7d15d to your computer and use it in GitHub Desktop.

Select an option

Save sreelallalu/f26263ddaca57445d61a2eb40fc7d15d to your computer and use it in GitHub Desktop.
FirebasePattern
public class FirebasePattern {
static String compileformat="[^a-zA-Z0-9-_.~%]";
public static String getValue(String s) {
Pattern pattern = Pattern.compile(compileformat);
Matcher matcher = pattern.matcher(s);
String number = matcher.replaceAll("_");
return number;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment