mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
Modified regex filter so it's in line with Solr 6 core name rules.
This commit is contained in:
parent
55ff4229f9
commit
d2cd213cd0
@ -87,14 +87,9 @@ final class Index {
|
||||
|
||||
String result;
|
||||
|
||||
// Remove all non-ASCII characters
|
||||
result = coreName.replaceAll("[^\\p{ASCII}]", "_"); //NON-NLS
|
||||
|
||||
// Remove all control characters
|
||||
result = result.replaceAll("[\\p{Cntrl}]", "_"); //NON-NLS
|
||||
|
||||
// Remove spaces / \ : ? ' "
|
||||
result = result.replaceAll("[ /?:'\"\\\\]", "_"); //NON-NLS
|
||||
// Allow these characters: '-', '.', '0'-'9', 'A'-'Z', '_', and 'a'-'z'.
|
||||
// Replace all else with '_'.
|
||||
result = coreName.replaceAll("[^-.0-9A-Z_a-z]", "_"); // NON-NLS
|
||||
|
||||
// Make it all lowercase
|
||||
result = result.toLowerCase();
|
||||
|
Loading…
x
Reference in New Issue
Block a user