---
title: "String基本知识"
author: "easy0917"
date: "2012-08-23T09:13:04Z"
tags: []
categories: ["编程语言"]
slug: "string"
draft: false
lastmod: "2012-08-18T21:06:53Z"
id: 1636762
url: "https://easy0917.iteye.com/blog/1636762"
---

1、replace和replaceAll区别（replaceFirst）

replace参数是字符或字符串。replaceAll参数正则表达式字符串。

2、\\说明。

\\在java中表示转义符。正则表示也是特殊字符。所以在正则表达式中表示一个“\\”要“\\\\\\\\”来表示。