Repository: nficano/humps

Issue:
sizeX decamelized as sizex
**Describe the bug**
String 'sizeX' is correctly identified as camelCase but is converted to snake_case as 'sizex'.

**To Reproduce**
```python
>>> humps.is_camelcase("sizeX")
True
>>> humps.decamelize("sizeX")
'sizex'
>>> humps.decamelize("camelCaseTest")
'camel_case_test'
```

**Expected behavior**
```python
>>> humps.decamelize("sizeX")
'size_x'
```

**Desktop (please complete the following information):**
 - OS: Ubuntu 18.04, Python 3.8
 - Version 1.6.1

Discussion:

Patch:
diff --git a/humps/main.py b/humps/main.py
index 9c58ac8..5ea96e7 100644
--- a/humps/main.py
+++ b/humps/main.py
@@ -21,8 +21,8 @@ if is_py3:  # pragma: no cover
 
 ACRONYM_RE = re.compile(r"([A-Z]+)$|([A-Z]+)(?=[A-Z0-9])")
 PASCAL_RE = re.compile(r"([^\-_\s]+)")
-SPLIT_RE = re.compile(r"([\-_\s]*[A-Z]+[^A-Z\-_\s]+[\-_\s]*)")
-UNDERSCORE_RE = re.compile(r"(?<=[^\-_\s])[\-_\s]+([^\-_\s])")
+SPLIT_RE = re.compile(r"([\-_\s]*[A-Z]+[^A-Z\-_\s]*[\-_\s]*)")
+UNDERSCORE_RE = re.compile(r"([^\-_\s])[\-_\s]+([^\-_\s])")
 
 
 def pascalize(str_or_iter):


Test patch:
diff --git a/tests/test_decamelize.py b/tests/test_decamelize.py
index 2d0e128..7d2092a 100644
--- a/tests/test_decamelize.py
+++ b/tests/test_decamelize.py
@@ -27,6 +27,10 @@ import humps
         ("_itemID", "_item_id"),
         # Fixed issue #4. 2021-05-01
         ("memMB", "mem_mb"),
+        # Fixed issue #127. 2021-09-13
+        ("sizeX", "size_x"),
+        # Fixed issue #168. 2021-09-13
+        ("aB", "a_b"),
     ],
 )
 def test_decamelize(input_str, expected_output):
diff --git a/tests/test_separate_words.py b/tests/test_separate_words.py
index e8a8ec0..ca9aa16 100644
--- a/tests/test_separate_words.py
+++ b/tests/test_separate_words.py
@@ -30,6 +30,10 @@ from humps.main import separate_words
         # Fixes issue #128
         ("whatever_hi", "whatever_hi"),
         ("whatever_10", "whatever_10"),
+        # Fixes issue #127
+        ("sizeX", "size_X"),
+        # Fixes issue #168
+        ("aB", "a_B"),
     ],
 )
 def test_separate_words(input_str, expected_output):