Skip to content

Commit

Permalink
cleanup: regex simplification (thank you intellij)
Browse files Browse the repository at this point in the history
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
  • Loading branch information
K0zka committed Dec 22, 2018
1 parent 27a0841 commit 224f30c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object SmartCtl : OsCommand {
it.substringBefore(" rpm").toInt()
}
},
userCapacity = properties["User Capacity"]?.substringBefore(" bytes")?.remove("(,|')".toRegex())?.toBigInteger()
userCapacity = properties["User Capacity"]?.substringBefore(" bytes")?.remove("([,'])".toRegex())?.toBigInteger()
?: ZERO,
sataVersion = properties["SATA Version is"]?.substringBetween("SATA ", ",") ?: "",
serialNumber = properties["Serial Number"] ?: ""
Expand Down

0 comments on commit 224f30c

Please sign in to comment.