Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function removeFromArrayIfFound(needle, stringArray){
- int matchCount = 0;
- string[] cleanedStringArray = new String[stringArray.length];
- for(int i=0; i<stringArray.length; i++){
- if( !regexCheck(needle, stringArray[i]) ){
- cleanedStringArray[matchCount] = stringArray[i];
- matchCount++;
- }
- }
- return cleanedStringArray;
- }
- function checkString(needle, haystack){
- Pattern pattern = Pattern.compile(needle);
- Matcher matcher = pattern.matcher(haystack);
- return matcher.matches();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement