Skip to content

Commit be0a8fc

Browse files
committed
fix regex code smell
1 parent dee7a2e commit be0a8fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public static ChargingPointType parse(String parsableString) throws ChargingPoin
169169

170170
// valid regex for either custom or pre-defined types
171171
String validCustomRegex =
172-
"([\\w \\-_]+)\\s*\\(\\s*(\\d+\\.?\\d+(?:E-?\\d+)?)\\s*\\|\\s*(AC|DC)\\s*\\)";
172+
"([\\w \\-]+)\\s*\\(\\s*(\\d+\\.?\\d+(?:E-?\\d+)?)\\s*\\|\\s*(AC|DC)\\s*\\)";
173173

174174
// does it match the valid regex?
175175
Pattern pattern = Pattern.compile(validCustomRegex);

0 commit comments

Comments
 (0)