---
title: "解决java中replace带特殊字符,如\"\\:)\"报错问题"
author: "carl_java"
date: "2015-02-04T20:14:45Z"
tags: []
categories: ["编程语言"]
slug: "java-replace"
draft: false
lastmod: "2015-02-04T20:14:45Z"
id: 2183487
url: "https://carl-java.iteye.com/blog/2183487"
---

可使用String key=Pattern.quote(emo);方法转义			content=content.replaceAll(key,prop.getProperty(emo));