We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16ef598 commit fdbbe7dCopy full SHA for fdbbe7d
ip/src/main/java/org/code_house/bacnet4j/wrapper/ip/OpenHabConfigurationVisitor.java
@@ -84,18 +84,9 @@ private static String openhabType(Property property) {
84
}
85
86
private static String openhabName(Property property) {
87
- return property.getName()
88
- .replace(" ", "_")
89
- .replaceAll("\\)$", "")
90
- .replaceAll("}$", "")
91
- .replaceAll("]$", "")
92
- .replace(":|;|\\.", "_")
93
- .replace("(", "_")
94
- .replace(")", "_")
95
- .replace("{", "_")
96
- .replace("}", "_")
97
- .replace("[", "_")
98
- .replace("]", "_")
+ return property.getName().trim()
+ .replaceAll("[^a-zA-Z0-9\\s]", "")
+ .replaceAll("\\s", "_")
99
// in the end - we replace non ascii characters
100
.replaceAll("[^\\x00-\\x7F]", "_");
101
0 commit comments