Regex

Can anyone tell me if it's possible to replace the ws between the brackets using replaceAll? And if so, how? I've tried a few different things but I always end up removing all the ws.

String s ="some stuff (more stuff **) and some more";

I want to remove the whitespace from between the brackets so I get:

String s ="some stuff (morestuff**) and some more";

[437 byte] By [CSAngela] at [2007-11-26 23:51:21]
# 1
Did you see the answers in your previous thread? http://forum.java.sun.com/thread.jspa?threadID=5156017
prometheuzza at 2007-7-11 15:29:58 > top of Java-index,Java Essentials,New To Java...
# 2
I did - they didn't help.I can substring it and remove the ws - I just figured there might be an easier way using RegEx. Only I can't seem to do it.null
CSAngela at 2007-7-11 15:29:58 > top of Java-index,Java Essentials,New To Java...
# 3
How didn't they help? I copied the code and pasted it with no changes and it worked perfectly, as I would have expected from our resident regex guru uncle_alice. A little more detail may help us point out what you are doing wrong.~Tim
SomeoneElsea at 2007-7-11 15:29:58 > top of Java-index,Java Essentials,New To Java...
# 4

> I did - they didn't help.

>

> I can substring it and remove the ws - I just figured

> there might be an easier way using RegEx. Only I

> can't seem to do it.

>

> null

I would've continued in that thread with a follow up question (and perhaps thanking the people already answering you there).

Good luck anyway.

prometheuzza at 2007-7-11 15:29:58 > top of Java-index,Java Essentials,New To Java...
# 5

> How didn't they help? I copied the code and pasted it

> with no changes and it worked perfectly, as I would

> have expected from our resident regex guru

> uncle_alice. A little more detail may help us point

> out what you are doing wrong.

>

> ~Tim

Holy ****! New responses. Didn't see them.

Thanks so much.

Message was edited by:

CSAngel

CSAngela at 2007-7-11 15:29:58 > top of Java-index,Java Essentials,New To Java...