有關正則表達式小結

正則表達式 實質就是字符串匹配,也就是字符匹配 經常使用方法 (matches 返回的是一個布爾型變量) Pattern p = Pattern.compile("a*b"); Matcher m = p.matcher("aaaaab"); boolean b = m.matches(); 經常使用的字符() | . | 匹配除換行符之外的任意字符 | \r | 匹配一個回車符 | […]
相關文章
相關標籤/搜索