Back to project page sqlite-analyzer.
The source code is released under:
Apache License
If you think the Android project sqlite-analyzer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.novoda.sqlite.impl; //from w w w . j a va 2 s .c om import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; public class TableCreateStatementParser { private final static Pattern p = Pattern.compile("(JOIN|FROM)\\W+(\\w+)"); public List<String> parseUsedTables(String sqlCreateStatement) { ArrayList<String> baseTables = new ArrayList<String>(); Matcher m = p.matcher(sqlCreateStatement.toUpperCase()); while (m.find()) { baseTables.add(m.group(2)); } return baseTables; } }