SQLite Backup command has wrong Regular Expression

45 views
Skip to first unread message

Daniel Glaser

unread,
Nov 12, 2012, 8:06:31 AM11/12/12
to xer...@googlegroups.com
Hi,

in version sqlite-jdbc-3.7.2 ExtendedCommand class line 61 in package org.sqlite, there is a problem with the regular expression when not supplying a database (default should be main). It assumes two whitespaces between "backup" and "to" if db is not given:

Pattern.compile("backup(\\s+(\"[^\"]*\"|'[^\']*\'|\\S+))?\\s+to\\s+(\"[^\"]*\"|'[^\']*\'|\\S+)");

Problem is here: "backup(___\\s___+(\"[^\"]*\"|'[^\']*\'|\\S+))?___\\s___+to\\s+(\"[^\"]*\"|'[^\']*\'|\\S+)"

One of the occurences should be optional (pull the second one into the second group and trim the result before quatation removal).

Cheers,
Daniel

Grace B

unread,
Feb 18, 2013, 7:57:22 AM2/18/13
to xer...@googlegroups.com

Grace B

unread,
Mar 2, 2013, 11:49:00 PM3/2/13
to xer...@googlegroups.com
Nothing to fix here. 

Unless you can give an example that does not work.
Reply all
Reply to author
Forward
0 new messages