AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

String.replaceAll (regex)

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian)
View previous topic :: View next topic  
Author Message
luigiT
Guest





PostPosted: Mon May 30, 2005 8:22 am    Post subject: String.replaceAll (regex) Reply with quote



Ciao,
Vorrei sostituire tutte le occorrenze di una parola se precedute da un
pattern specificato.
Esempio
Sostituire '_cliente' con '_fornitore' tutte le volte che è preceduto
da b.w+
b.codice_cliente -> b.codice_fornitore
b.citta_cliente -> b.citta_fornitore
ma non a.citta_cliente

un quancosa tipo stringa.replaceAll("b\.\w+_cliente","_fornitore") mi
intercetta le occorrenze esatte, ma mi sostituisce tutto e non solo
_cliente

Avrei invece bisogno che b.w+ fosse parte della ricerca, ma non della
sostituzione

Grazie
LuigiT

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.