Results 1 to 2 of 2
  1. #1
    bdl1127 is offline Member
    Join Date
    Jan 2012
    Rep Power

    Default Making value list using regular expressions

    Hello, im trying to use regular expressions to create something such as the following:

    currently, this regular expression below takes care of this: insert col into table1;

    however, i need a regEx that can take care of the above, but also a list...for example:

    insert col,row into table1;

    Im not quite sure how to make a list, separated by commas.

    Any help is greatly appreciated!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: Making value list using regular expressions

    Insufficiently defined requirements. What about (1) spaces within the comma separated list (2) other characters like underscore? (3) two consecutive commas? Allowed or not?

    If the single example is totally representative of the requirement, it should be trivial -- provided you understand your regex and didn't just copy it blindly from somewhere.

    What's this for anyways? SQL injection?

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Regular expressions
    By freelancer in forum New To Java
    Replies: 1
    Last Post: 11-25-2011, 12:41 PM
  2. Java Regular Expressions: Comma Seperated List
    By sgtblitz in forum New To Java
    Replies: 3
    Last Post: 04-18-2011, 09:17 PM
  3. Regular Expressions Help
    By Death Sickle in forum New To Java
    Replies: 4
    Last Post: 04-04-2011, 04:21 AM
  4. regular expressions
    By sozeee in forum New To Java
    Replies: 3
    Last Post: 12-06-2010, 09:58 PM
  5. Using Quantifiers in regular expressions
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-10-2008, 10:43 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