Here you can find the source of replaceInArray(String[] thisArray, String findThis, String replaceWithThis)
public static String[] replaceInArray(String[] thisArray, String findThis, String replaceWithThis)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { public static String[] replaceInArray(String[] thisArray, String findThis, String replaceWithThis) { String[] outputArray = new String[thisArray.length]; for (int i = 0; i < thisArray.length; i++) { outputArray[i] = thisArray[i].replaceAll(findThis, replaceWithThis); }//from w w w . j a v a2 s . c om return outputArray; } public static ArrayList<String[]> replaceInArray(ArrayList<String[]> thisArrayList, String findThis, String replaceWithThis) { ArrayList<String[]> outputArrayList = new ArrayList<String[]>(); for (int i = 0; i < thisArrayList.size(); i++) { outputArrayList.add(replaceInArray(thisArrayList.get(i), findThis, replaceWithThis)); } return outputArrayList; } }