[android-developers] Re: String.replaceAll with regular expression

2013-04-07 Thread Lew
Ralph Bergmann wrote: I want to replace parts of a string but get an error :-( The code: String reSiezedURL = foo; reSiezedURL = reSiezedURL.replaceAll((?w=[0-9]+), reSiezed? String.format(?w=%d, this.reqWidth)); reSiezedURL = reSiezedURL.replaceAll((w=[0-9]+),

Re: [android-developers] Re: String.replaceAll with regular expression

2013-04-07 Thread Ralph Bergmann | the4thFloor.eu
Am 07.04.13 09:34, schrieb Lew: Ralph Bergmann wrote: Caused by: java.util.regex.PatternSyntaxException: Invalid value for match mode flags near index 4: (?w=[0-9]+) ^ I found it, the problem is the ? at the beginning. It is also a regex metacharacter. ([?]w=[0-9]+) works