Results 1 to 3 of 3
  1. #1
    mariaK is offline Member
    Join Date
    Nov 2011
    Posts
    2
    Rep Power
    0

    Default How to parse an expression with given format

    Hello,
    I need to read an expression from text file in this format
    (x1,y1),(x2,y2)
    when x1,y1,x2,y2 are integers,

    I've already tried many different ways and didn't find solution.
    Thank you for your help:)

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,453
    Blog Entries
    7
    Rep Power
    20

    Default Re: How to parse an expression with given format

    Use a regular expression and search for "\\d+" to find the integers in the String.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    mariaK is offline Member
    Join Date
    Nov 2011
    Posts
    2
    Rep Power
    0

    Default Re: How to parse an expression with given format

    Thanks , you helped me a lot

Similar Threads

  1. Replies: 2
    Last Post: 07-18-2011, 07:11 AM
  2. Replies: 4
    Last Post: 07-08-2011, 07:47 PM
  3. Example to check format using regular expression?
    By Xycose in forum New To Java
    Replies: 7
    Last Post: 11-14-2010, 06:05 PM
  4. JSF expression inside another JSF expression
    By barbarabxl in forum JavaServer Faces (JSF)
    Replies: 2
    Last Post: 05-21-2010, 03:03 PM
  5. how to convert one format to another format
    By mahipal_reddy621 in forum New To Java
    Replies: 1
    Last Post: 12-02-2008, 10:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •