Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #4804
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!texta.sil.at!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| From | Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> |
| Subject | Re: Confusion about String.matches method |
| References | <baaf3c9c-b3be-4d14-a5de-2149617640b2@k17g2000vbn.googlegroups.com> |
| Reply-To | avl@logic.at |
| User-Agent | slrn/pre0.9.9-111 (Linux) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| Message-ID | <slrniua9ad.phi.avl@gamma.logic.tuwien.ac.at> (permalink) |
| Date | 31 May 2011 17:28:45 GMT |
| Lines | 19 |
| NNTP-Posting-Host | gamma.logic.tuwien.ac.at |
| X-Trace | 1306862925 tunews.univie.ac.at 60386 128.130.175.3 |
| X-Complaints-To | abuse@tuwien.ac.at |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4804 |
Show key headers only | View raw
laredotornado <laredotornado@zipmail.com> wrote:
> Hi,
> I'm using Java 1.6. How would I modify my regular expression below
> ^Starting at \$32,000*$
^Starting at \$32,000\*$
> so that it will match the string, "Starting at $32,000*". In other
> words, I have
> String regEx = "^Starting at \\$32,000*$";
String regEx = "^Starting at \\$32,000\\*$";
> String text = "Starting at $32,000*";
> if (!text.matches(regEx)) {
> throw new RuntimeException("does not match");
> }
> but the exception is always thrown. Please let me know how can I
> modify my reg ex to match. Thanks, - Dave
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Confusion about String.matches method laredotornado <laredotornado@zipmail.com> - 2011-05-31 10:24 -0700
Re: Confusion about String.matches method Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-05-31 17:28 +0000
Re: Confusion about String.matches method laredotornado <laredotornado@zipmail.com> - 2011-05-31 13:15 -0700
Re: Confusion about String.matches method Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-31 23:10 +0200
Re: Confusion about String.matches method Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-05-31 21:26 +0000
Re: Confusion about String.matches method Ian Shef <invalid@avoiding.spam> - 2011-05-31 22:20 +0000
Re: Confusion about String.matches method Roedy Green <see_website@mindprod.com.invalid> - 2011-05-31 15:53 -0700
Re: Confusion about String.matches method laredotornado <laredotornado@zipmail.com> - 2011-06-01 07:10 -0700
Re: Confusion about String.matches method Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-06-01 16:02 +0100
Re: Confusion about String.matches method Roedy Green <see_website@mindprod.com.invalid> - 2011-06-06 00:50 -0700
Re: Confusion about String.matches method Esmond Pitt <esmond.pitt@bigpond.com> - 2011-06-06 20:18 +1000
Re: Confusion about String.matches method Roedy Green <see_website@mindprod.com.invalid> - 2011-06-07 21:15 -0700
Re: Confusion about String.matches method Michael Wojcik <mwojcik@newsguy.com> - 2011-06-08 11:13 -0400
Re: Confusion about String.matches method Esmond Pitt <esmond.pitt@bigpond.com> - 2011-06-09 19:19 +1000
Re: Confusion about String.matches method Roedy Green <see_website@mindprod.com.invalid> - 2011-06-07 21:18 -0700
Re: Confusion about String.matches method Gene Wirchenko <genew@ocis.net> - 2011-06-08 07:50 -0700
Re: Confusion about String.matches method Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-06-06 12:15 +0100
Re: Confusion about String.matches method Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-01 11:17 -0400
Re: Confusion about String.matches method Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-06-01 18:59 +0200
Re: Confusion about String.matches method Ian Shef <invalid@avoiding.spam> - 2011-06-01 19:41 +0000
Re: Confusion about String.matches method Jim Janney <jjanney@shell.xmission.com> - 2011-06-01 08:41 -0600
csiph-web