Created
November 1, 2017 06:33
-
-
Save sreelallalu/f26263ddaca57445d61a2eb40fc7d15d to your computer and use it in GitHub Desktop.
FirebasePattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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