1.题目描述 Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: s = "leetcode" return 0. s = "loveleetcode", return 2. Note: You may assume the string contain only
String regEx="[\n`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}[]‘::”“’., .?]"; //可以在中括号内加上任何想要替换的字符,实际上是一个正则表达式 String aa = " ";//这里是将特殊字符换为aa字符串," "代表直接去掉 Pattern p = Pattern.compile(regEx); Matcher m = p