quote « replace « Java Regex Q&A

Home
Java Regex Q&A
1.Development
2.find
3.group
4.Match
5.matcher
6.number
7.Operation
8.parse
9.Pattern
10.replace
11.validation
12.word
Java Regex Q&A » replace » quote 

1. How do you replace double quotes with a blank space in Java?    stackoverflow.com

For example:

"I don't like these "double" quotes"
and I want the output to be
I don't like these double quotes

2. Regex - replacing textwhich is not in quotes    stackoverflow.com

I need to "translate" pascal code (not whole code, just lines line a:=5, or Writeln("a=5?"). In pascal = means "is equal", but my program replaces [^=!<>]=[^=!<>]with ==, so in writeln("a=5?") the ...

3. Replacing spaces within quotes    stackoverflow.com

I'm really struggling with regex here. Using Java how would I go about replacing all spaces within quotes (double quotes really) with another character (or escaped space "\ ") but ONLY ...

4. Replace all double quotes withing String    stackoverflow.com

I am retriving data from database where a field contains String with HTML data. I want to replace all the double quotes such that it can be used for parseJSON of ...

5. Replace a substring in a string except when the string is inside quotes    stackoverflow.com

Regex dialect: Java
The problem: given a string, replace all occurrences of a substring inside it, except when these occurrences are inside quotes. Example1:

string: "test substr 'test substr' substr"
substring: "substr"
replacement: "YYYY"
output: "test YYYY ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.