Subversion Repositories eFlore/Applications.coel

Rev

Rev 888 | Rev 1110 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 888 Rev 948
Line 27... Line 27...
27
	 * @return
27
	 * @return
28
	 */
28
	 */
29
	public static String quote(String chaine) {
29
	public static String quote(String chaine) {
30
		chaine.replace("\\", "\\\\");
30
		chaine.replace("\\", "\\\\");
Line 31... Line 31...
31
		
31
		
32
		String[] caracteresSpeciaux = {".", "$", "[", "]", "(", ")", "{", "}", "^", "?", "*", "+", "-"};
32
		String[] caracteresSpeciaux = {".", "$", "[", "]", "(", ")", "{", "}", "^", "?", "*", "+", "-", "|"};
33
		for (int i = 0; i < caracteresSpeciaux.length; i++) {
33
		for (int i = 0; i < caracteresSpeciaux.length; i++) {
34
			chaine = chaine.replace(caracteresSpeciaux[i], "\\"+caracteresSpeciaux[i]);
34
			chaine = chaine.replace(caracteresSpeciaux[i], "\\"+caracteresSpeciaux[i]);
35
		}
35
		}
36
		return chaine;
36
		return chaine;