diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 8545f4f..5267e2b 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,3 +1,8 @@
+v3.4.2
+======
+
+* fix #395: correctly transfer tag regex in the Configuration constructor
+
 v3.4.1
 ======
 
diff --git a/src/setuptools_scm/config.py b/src/setuptools_scm/config.py
index 7dee1e4..139512d 100644
--- a/src/setuptools_scm/config.py
+++ b/src/setuptools_scm/config.py
@@ -66,7 +66,7 @@ class Configuration(object):
         self.fallback_version = fallback_version
         self.fallback_root = fallback_root
         self.parse = parse
-        self.tag_regex = DEFAULT_TAG_REGEX
+        self.tag_regex = tag_regex
         self.git_describe_command = git_describe_command
 
     @property

tag_regex not working with setuptools_scm 3.4.1
With setuptools_scm 3.4.1, custom tag_regex expressions are not working correctly.

My setup.py contains:

    ...
    setup_args["use_scm_version"] = {
        "tag_regex": r"^(?P<prefix>.*/)?(?P<version>\d+(?:\.\d+){1,2})$"
        }
    setup_args["setup_requires"] = ['setuptools_scm']

    setuptools.setup(**setup_args)

setuptools_scm 3.4.0 works:

    $ python3 setup.py --version
    0.4.1.dev7+gc2397c5'

With 3.4.1:

    $ python3 setup.py --version
    /home/kolbus/.local/lib/python3.6/site-packages/setuptools_scm/version.py:92: UserWarning: tag 'development/0.4.0' no version found
      warnings.warn("tag {!r} no version found".format(tag))
    Traceback (most recent call last):
    ...
      File "/home/kolbus/.local/lib/python3.6/site-packages/setuptools_scm/git.py", line 135, in parse
    branch=branch,
      File "/home/kolbus/.local/lib/python3.6/site-packages/setuptools_scm/version.py", line 205, in meta
        assert parsed_version is not None, "cant parse version %s" % tag
    AssertionError: cant parse version development/0.4.0


diff --git a/testing/test_config.py b/testing/test_config.py
index 38bc8f4..b8ea265 100644
--- a/testing/test_config.py
+++ b/testing/test_config.py
@@ -1,7 +1,7 @@
 from __future__ import unicode_literals
 
 from setuptools_scm.config import Configuration
-
+import re
 import pytest
 
 
@@ -26,3 +26,9 @@ def test_config_from_pyproject(tmpdir):
     fn = tmpdir / "pyproject.toml"
     fn.write_text("[tool.setuptools_scm]\n", encoding="utf-8")
     assert Configuration.from_file(str(fn))
+
+
+def test_config_regex_init():
+    tag_regex = re.compile(r"v(\d+)")
+    conf = Configuration(tag_regex=tag_regex)
+    assert conf.tag_regex is tag_regex

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest importlib_metadata
3.7
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi @ file:///croot/certifi_1671487769961/work/certifi
exceptiongroup==1.2.2
importlib-metadata==6.7.0
iniconfig==2.0.0
packaging==24.0
pluggy==1.2.0
pytest==7.4.4
-e git+https://github.com/pypa/setuptools_scm.git@823c3acac310aab86a57e4a26405db2a7296164a#egg=setuptools_scm
tomli==2.0.1
typing_extensions==4.7.1
zipp==3.15.0

name: setuptools_scm
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=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - 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=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - exceptiongroup==1.2.2
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - packaging==24.0
      - pluggy==1.2.0
      - pytest==7.4.4
      - setuptools-scm==3.4.2.dev2+g823c3ac
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - zipp==3.15.0
prefix: /opt/conda/envs/setuptools_scm

testing/test_config.py::test_config_regex_init
testing/test_config.py::test_config_from_pyproject
testing/test_config.py::test_tag_regex[apache-arrow-0.9.0-0.9.0] testing/test_config.py::test_tag_regex[arrow-0.9.0-0.9.0] testing/test_config.py::test_tag_regex[arrow-0.9.0-rc-0.9.0-rc] testing/test_config.py::test_tag_regex[v1.1-v1.1] testing/test_config.py::test_tag_regex[V1.1-V1.1]
CHANGELOG.rst src/setuptools_scm/config.py
CHANGELOG.rst src/setuptools_scm/config.py