Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #4205
| Path | csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Sun, 27 Aug 2017 15:30:05 -0500 |
| From | IchBin |
| Newsgroups | comp.lang.java.help |
| Subject | Re: Regx problem |
| Date | Sun, 27 Aug 2017 16:30:18 -0400 |
| Message-ID | <asa6qc100b4rr1jufdbllg4etgedc4rpr1@4ax.com> (permalink) |
| References | <hhr5qcpbuc0fcajj5hnvuegtgv50ou5vpq@4ax.com> |
| User-Agent | ForteAgent/7.20.32.1218 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| Lines | 23 |
| X-Usenet-Provider | http://www.giganews.com |
| X-Trace | sv3-wREsmft6uOevXYvrXOnVGfJw2xhTjhQshV1jJ1XqGMjVG6OlGuZKk3PdvoCbx8CH01xTY1uFQQCKF5I!o3/mgG/1RV3U9iA5HRrIOk8Vh2+aCjb+iB73sWGyjunxaa/Ndev4lzM2TvOFjye+16zmhpy+ |
| X-Complaints-To | abuse@giganews.com |
| X-DMCA-Notifications | http://www.giganews.com/info/dmca.html |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 1773 |
| Xref | csiph.com comp.lang.java.help:4205 |
Show key headers only | View raw
On Sun, 27 Aug 2017 12:17:11 -0400, IchBin wrote:
>I have always had a hard time with regx. Even the simple things like
>this one. All I want to do is replace a string with another string. In
>this case a ' replaced with ''.
>
>I am trying:
> rsNname = rsNname.replaceAll("\\d \\D \\W \\w \\S \\s", "''");
> rsNname = rsNname.replaceAll("[+.-^]", "''");
> rsNname = rsNname.replaceAll("[$&+,:;=?@#|'<>.^*()%!-]", "''");
>rsNname = rsNname.replaceAll("['++]", "\\''");
>
>Nomatter what I do I get a compli error "Derefferencing pointer
>error". Any one have any suggestions.
>
>I could write code to do the same but seems better to do in one
>commane.
>
>Thanks in advance
Thanks but I fixed it. What I needed was
rsNname = rsNname.replaceAll("\''","''");
Back to comp.lang.java.help | Previous | Next — Previous in thread | Next in thread | Find similar
Regx problem IchBin - 2017-08-27 12:17 -0400
Re: Regx problem Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-08-27 15:17 -0400
Re: Regx problem IchBin - 2017-08-28 09:13 -0400
Re: Regx problem IchBin - 2017-08-27 16:30 -0400
Re: Regx problem Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-08-27 16:53 -0400
csiph-web