Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Java split for parsing MySQL enum values

Last post 07-11-2012, 11:07 AM by gw1500se. 1 replies.
Sort Posts: Previous Next
  •  07-11-2012, 10:38 AM 85728

    Java split for parsing MySQL enum values

    I am trying to write a Java 'split' or 'matcher' regex to extract the individual values from a MySQL enum column. The format of the string to be parsed is:

     

    enum('v1','v2','v3',...)

     

    There is an unknown number of values enclosed by apostrophes. Can someone help me with the regex to extract those values as my attempts have all been fruitless. I expect it is relatively simple for someone other than me. Note that there will be no apostrophes in the values. TIA.

  •  07-11-2012, 11:07 AM 85733 in reply to 85728

    Re: Java split for parsing MySQL enum values

    Never mind. The problem was I used the wrong Java function. I had the right regex but I needed to use Matcher not split. Sorry.
View as RSS news feed in XML