Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. function removeFromArrayIfFound(needle, stringArray){
  2. int matchCount = 0;
  3. string[] cleanedStringArray = new String[stringArray.length];
  4. for(int i=0; i<stringArray.length; i++){
  5. if( !regexCheck(needle, stringArray[i]) ){
  6. cleanedStringArray[matchCount] = stringArray[i];
  7. matchCount++;
  8. }
  9. }
  10. return cleanedStringArray;
  11. }
  12.  
  13. function checkString(needle, haystack){ return $haystack.Regex($needle); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement