gaurav v bagga schreef:
> hi,
>
[quoted text clipped - 5 lines]
>
> doesn't work for me
Of course not. Why did you put the brackets in there? Did you read the
link Randolf gave you? The brackets mean: either of the symbols in
here. So [\\\.\\.] means: a dot or a dot, i.e. a dot. That is, the
first dot is found and gets replaced. If you want both dots, just
remove the brackets.
> instead of ".."=>","
> i get
> ",."
For a good introduction to regular expressions, I suggest you read
perlretut (google for it). It is written for Perl, but Java has almost
the same syntax, except for the quoting oddities (i.e. everywhere you
need \ in Perl, you need \\ in Java).
H.
- --
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html