Extracts the name of a database from the name of a backup. @param backup name of the backup (empty string for general data), optionally followed by date @return name of the database (empty string for general data)
(final String backup)
| 149 | * @return name of the database (empty string for general data) |
| 150 | */ |
| 151 | public static String name(final String backup) { |
| 152 | final String[] strings = Pattern.compile('-' + DATE + '$').split(backup); |
| 153 | return strings.length > 0 ? strings[0] : ""; |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * Extracts the date of a database from the name of a backup. |