Yeah it was a problem with my code although I could not identify it, it works now.
PS. Do you know of any Java mailing lists where you can ask newbie questions without getting snobbed? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Mandel Sent: Friday, 8 July 2005 1:04 PM To: CFAussie Mailing List Subject: [cfaussie] Re: [OT] Parse Integer out of string with Java What does 'm.group()' return? I'm also confused by when you say it returns 'nothing'. Integer.parseInt() will either return a number, or it will throw an exception, I've never seen it do any different. Are you getting an exception? Mark On 7/8/05, Taco Fleur <[EMAIL PROTECTED]> wrote: > > > > Sorry guys, I tried a Aussie Java Mailing list but got a message back from > the moderator basically saying my question was to silly for them. > > > > So here goes in the hope someone here can answer this. > > > > I need to parse an integer out of string with a regEx. > > > > I tried: > > > > Pattern p = Pattern.compile("([0-9]*)"); > > > > Matcher m = p.matcher("BDAT 24 LAST\nEND"); > > if (m.matches()) { > > byteToRead = Integer.parseInt(m.group(1)); > > System.out.println("byteToRead = " + byteToRead); > > } > > But it gives me nothing, even when I use "." as the regEx. -- E: [EMAIL PROTECTED] W: www.compoundtheory.com ICQ: 3094740 --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/ --- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
