This week's book giveaway is in the
Agile and other Processes
forum.
We're giving away four copies of
The Mikado Method
and have Ola Ellnestam and Daniel Brolund on-line!
See
this thread
for details.
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Java in General
Author
Building this regular expression with replaceAll
Francesco Marchioni
author
Ranch Hand
Joined: Sep 22, 2003
Posts: 175
posted
Jun 30, 2005 01:04:00
0
Hi all,
I'm having problems in building a regular expression
that transforms negative numbers.
I need to put a single quote around negative numbers.
That is:
String
formula = "SWITCH: case 1: method1() case -1: exit()";
should become:
"SWITCH: case 1: method1() case '-1': exit()";
Does anybody know how to obtain it with replaceAll() ?
Thanks a lot
Francesco
JBoss AS 5 Development
JBoss Tutorials
Alan Moore
Ranch Hand
Joined: May 06, 2004
Posts: 262
posted
Jun 30, 2005 01:28:00
0
I already answered this question over at the Java Forums.
Tsk, tsk!
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Building this regular expression with replaceAll
Similar Threads
Counting words in a String
Capturing "Enter Key" Value in Javascript
remove "." from string
replaceall() doubt
how to check whether BigDecimal or String is whole number or not ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter