We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db93106 commit ef6f7ceCopy full SHA for ef6f7ce
src/FileSize/Parser/SizeStringParser.php
@@ -18,7 +18,7 @@ class SizeStringParser
18
* - 123 MB
19
* - 1 gigabytes
20
*/
21
- const SIZE_STRING_PATTERN = '/^([0-9\.-]+)\s*?([A-Za-z]+)?$/';
+ const SIZE_STRING_PATTERN = '/^(-?[0-9\.]+)\s*([A-z]+)?$/';
22
23
/**
24
* Parse a size string into its parts (value, unit).
0 commit comments