I have the following text:
some cool color #12eedd more cool colors #4567aa
I want that this string will be transformed to:
some cool color #{1} more cool colors #{2}
How is it possible to do it in Java (1.6)?
What I've found so far is the regex for color: #[0-9abcdef]{3,6}
#[0-9abcdef]{3,6}But I don't know how I can iterate over string and replace the colors.[0-9a-f]instead of[0-9abcdef]...