mirror of
https://github.com/democratic-csi/democratic-csi.git
synced 2026-10-09 11:05:43 +02:00
use regex for more robust replacement parsing
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
+3
-3
@@ -272,9 +272,9 @@ class NVMEoF {
|
||||
* old: "Address":"traddr=127.0.0.1 trsvcid=4420"
|
||||
* new: "Address":"traddr=127.0.0.1,trsvcid=4420"
|
||||
*/
|
||||
controllerAddress = controllerAddress.replaceAll(
|
||||
" trsvcid=",
|
||||
",trsvcid="
|
||||
controllerAddress = controllerAddress.replace(
|
||||
new RegExp(/ ([a-z]*=)/, "g"),
|
||||
",$1"
|
||||
);
|
||||
let parts = controllerAddress.split(",");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user