diff --git a/gabbi/handlers.py b/gabbi/handlers.py
index e4ed7f5..5302f3e 100644
--- a/gabbi/handlers.py
+++ b/gabbi/handlers.py
@@ -110,6 +110,8 @@ class JSONResponseHandler(ResponseHandler):
         if (hasattr(expected, 'startswith') and expected.startswith('/')
                 and expected.endswith('/')):
             expected = expected.strip('/').rstrip('/')
+            # match may be a number so stringify
+            match = str(match)
             test.assertRegexpMatches(
                 match, expected,
                 'Expect jsonpath %s to match /%s/, got %s' %

regex matching in JSONResponseHandler doesn't deal with numbers
If the match is a number, the regex matching errors out. We need to cast to a string before doing the regex test.
diff --git a/gabbi/tests/gabbits_intercept/regex.yaml b/gabbi/tests/gabbits_intercept/regex.yaml
index 4416be9..9a0c055 100644
--- a/gabbi/tests/gabbits_intercept/regex.yaml
+++ b/gabbi/tests/gabbits_intercept/regex.yaml
@@ -14,6 +14,8 @@ tests:
   data:
     alpha: cow
     beta: pig
+    gamma: 1
   response_json_paths:
     $.alpha: /ow$/
     $.beta: /(?!cow).*/
+    $.gamma: /\d+/
diff --git a/gabbi/tests/test_handlers.py b/gabbi/tests/test_handlers.py
index 67bd30c..3f8b72f 100644
--- a/gabbi/tests/test_handlers.py
+++ b/gabbi/tests/test_handlers.py
@@ -128,6 +128,34 @@ class HandlersTest(unittest.TestCase):
         with self.assertRaises(AssertionError):
             self._assert_handler(handler)
 
+    def test_response_json_paths_regex(self):
+        handler = handlers.JSONResponseHandler(self.test_class)
+        self.test.content_type = "application/json"
+        self.test.test_data = {'response_json_paths': {
+            '$.objects[0].name': '/ow/',
+        }}
+        self.test.json_data = {
+            'objects': [{'name': 'cow',
+                         'location': 'barn'},
+                        {'name': 'chris',
+                         'location': 'house'}]
+        }
+        self._assert_handler(handler)
+
+    def test_response_json_paths_regex_number(self):
+        handler = handlers.JSONResponseHandler(self.test_class)
+        self.test.content_type = "application/json"
+        self.test.test_data = {'response_json_paths': {
+            '$.objects[0].name': '/\d+/',
+        }}
+        self.test.json_data = {
+            'objects': [{'name': 99,
+                         'location': 'barn'},
+                        {'name': 'chris',
+                         'location': 'house'}]
+        }
+        self._assert_handler(handler)
+
     def test_response_headers(self):
         handler = handlers.HeadersResponseHandler(self.test_class)
         self.test.response = {'content-type': 'text/plain'}

pip install -e .
parse_log_pytest
requirements.txt
pytest mock testrepository coverage hacking sphinx
3.5
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
attrs==22.2.0
Babel==2.11.0
certifi==2021.5.30
charset-normalizer==2.0.12
colorama==0.4.5
coverage==6.2
decorator==5.1.1
docutils==0.18.1
extras==1.0.0
fixtures==4.0.1
flake8==3.8.4
-e git+https://github.com/cdent/gabbi.git@2bd1c803b71bd26be7822be87e249a811467b863#egg=gabbi
hacking==4.1.0
idna==3.10
imagesize==1.4.1
importlib-metadata==4.8.3
iniconfig==1.1.1
iso8601==1.1.0
Jinja2==3.0.3
jsonpath-rw==1.4.0
jsonpath-rw-ext==1.2.2
MarkupSafe==2.0.1
mccabe==0.6.1
mock==5.2.0
packaging==21.3
pbr==6.1.1
pluggy==1.0.0
ply==3.11
py==1.11.0
pycodestyle==2.6.0
pyflakes==2.2.0
Pygments==2.14.0
pyparsing==3.1.4
pytest==7.0.1
python-subunit==1.4.2
pytz==2025.2
PyYAML==6.0.1
requests==2.27.1
six==1.17.0
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
testrepository==0.0.21
testtools==2.6.0
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
wsgi_intercept==1.13.1
zipp==3.6.0

name: gabbi
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - attrs==22.2.0
      - babel==2.11.0
      - charset-normalizer==2.0.12
      - colorama==0.4.5
      - coverage==6.2
      - decorator==5.1.1
      - docutils==0.18.1
      - extras==1.0.0
      - fixtures==4.0.1
      - flake8==3.8.4
      - hacking==4.1.0
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - iso8601==1.1.0
      - jinja2==3.0.3
      - jsonpath-rw==1.4.0
      - jsonpath-rw-ext==1.2.2
      - markupsafe==2.0.1
      - mccabe==0.6.1
      - mock==5.2.0
      - packaging==21.3
      - pbr==6.1.1
      - pluggy==1.0.0
      - ply==3.11
      - py==1.11.0
      - pycodestyle==2.6.0
      - pyflakes==2.2.0
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-subunit==1.4.2
      - pytz==2025.2
      - pyyaml==6.0.1
      - requests==2.27.1
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - testrepository==0.0.21
      - testtools==2.6.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - wsgi-intercept==1.13.1
      - zipp==3.6.0
prefix: /opt/conda/envs/gabbi

gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths_regex_number
gabbi/tests/test_handlers.py::HandlersTest::test_resonse_headers_stringify gabbi/tests/test_handlers.py::HandlersTest::test_response_headers gabbi/tests/test_handlers.py::HandlersTest::test_response_headers_fail_data gabbi/tests/test_handlers.py::HandlersTest::test_response_headers_fail_header gabbi/tests/test_handlers.py::HandlersTest::test_response_headers_regex gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths_fail_data gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths_fail_path gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths_regex gabbi/tests/test_handlers.py::HandlersTest::test_response_strings gabbi/tests/test_handlers.py::HandlersTest::test_response_strings_fail gabbi/tests/test_handlers.py::HandlersTest::test_response_strings_fail_big_output gabbi/tests/test_handlers.py::HandlersTest::test_response_strings_fail_big_payload
gabbi/handlers.py
gabbi/handlers.py