diff --git a/yotta/lib/sourceparse.py b/yotta/lib/sourceparse.py
index 0f451ad..eb1f0b4 100644
--- a/yotta/lib/sourceparse.py
+++ b/yotta/lib/sourceparse.py
@@ -57,7 +57,7 @@ def _getNonRegistryRef(source_url):
     # something/something#spec = github
     # something/something@spec = github
     # something/something spec = github
-    github_match = re.match('^([.a-z0-9_-]+/([.a-z0-9_-]+)) *[@#]?([.a-z0-9_\-\*\^\~\>\<\=]*)$', source_url, re.I)
+    github_match = re.match(r'^([.a-z0-9_-]+/([.a-z0-9_-]+)) *[@#]?([^/:\?\[\\]*)$', source_url, re.I)
     if github_match:
         return github_match.group(2), VersionSource('github', github_match.group(1), github_match.group(3))
 

Semver incompatibility
Hi,

It seems the recent version has broken semantic version for any previous version, which we heavily use in our project, [microbit-dal](https://github.com/lancaster-university/microbit-dal).

We have had two new users on v18 who have reported this breakage: https://github.com/lancaster-university/microbit-dal/issues/282

Any help would be greatly appreciated :smile:
diff --git a/yotta/test/test_sourceparse.py b/yotta/test/test_sourceparse.py
index 0b7af6f..2c421ba 100644
--- a/yotta/test/test_sourceparse.py
+++ b/yotta/test/test_sourceparse.py
@@ -47,6 +47,7 @@ Git_Specs = [
     '~1.2.3',
     '-1.2.3',
     'branch-or-tag-name',
+    'branch+or+tag+name',
     'd5f5049',
 ]
 

pip install -e .[develop]
parse_log_pytest
requirements.txt
pytest
3.9
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
argcomplete==1.12.3
certifi==2025.1.31
cffi==1.17.1
charset-normalizer==3.4.1
colorama==0.3.9
cryptography==44.0.2
Deprecated==1.2.18
exceptiongroup==1.2.2
future==1.0.0
hgapi==1.7.4
idna==3.10
iniconfig==2.1.0
intelhex==2.3.0
intervaltree==3.1.0
Jinja2==2.11.3
jsonpointer==1.14
jsonschema==2.6.0
MarkupSafe==3.0.2
mbed_test_wrapper==1.0.0
packaging==24.2
pathlib==1.0.1
pluggy==1.5.0
project-generator-definitions==0.2.46
project_generator==0.8.17
pycparser==2.22
pyelftools==0.23
PyGithub==1.54.1
PyJWT==1.7.1
pyocd==0.15.0
pytest==8.3.5
pyusb==1.3.1
PyYAML==3.13
requests==2.32.3
semantic-version==2.10.0
six==1.17.0
sortedcontainers==2.4.0
tomli==2.2.1
urllib3==2.3.0
valinor==0.0.15
websocket-client==1.8.0
wrapt==1.17.2
xmltodict==0.14.2
-e git+https://github.com/ARMmbed/yotta.git@4094b7a26c66dd64ff724d4f72da282d41ea9fca#egg=yotta

name: yotta
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
  - 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=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - argcomplete==1.12.3
      - argparse==1.4.0
      - certifi==2025.1.31
      - cffi==1.17.1
      - charset-normalizer==3.4.1
      - colorama==0.3.9
      - cryptography==44.0.2
      - deprecated==1.2.18
      - exceptiongroup==1.2.2
      - future==1.0.0
      - hgapi==1.7.4
      - idna==3.10
      - iniconfig==2.1.0
      - intelhex==2.3.0
      - intervaltree==3.1.0
      - jinja2==2.11.3
      - jsonpointer==1.14
      - jsonschema==2.6.0
      - markupsafe==3.0.2
      - mbed-test-wrapper==1.0.0
      - packaging==24.2
      - pathlib==1.0.1
      - pluggy==1.5.0
      - project-generator==0.8.17
      - project-generator-definitions==0.2.46
      - pycparser==2.22
      - pyelftools==0.23
      - pygithub==1.54.1
      - pyjwt==1.7.1
      - pyocd==0.15.0
      - pytest==8.3.5
      - pyusb==1.3.1
      - pyyaml==3.13
      - requests==2.32.3
      - semantic-version==2.10.0
      - six==1.17.0
      - sortedcontainers==2.4.0
      - tomli==2.2.1
      - urllib3==2.3.0
      - valinor==0.0.15
      - websocket-client==1.8.0
      - wrapt==1.17.2
      - xmltodict==0.14.2
prefix: /opt/conda/envs/yotta

yotta/test/test_sourceparse.py::TestParseSourceURL::test_shorthandURLs yotta/test/test_sourceparse.py::TestParseModuleNameAndSpec::test_ShorthandRefs
yotta/test/test_sourceparse.py::TestParseSourceURL::test_gitURLs yotta/test/test_sourceparse.py::TestParseSourceURL::test_githubURLs yotta/test/test_sourceparse.py::TestParseSourceURL::test_hgURLs yotta/test/test_sourceparse.py::TestParseSourceURL::test_invalid yotta/test/test_sourceparse.py::TestParseSourceURL::test_registryURLs yotta/test/test_sourceparse.py::TestParseModuleNameAndSpec::test_GitRefs yotta/test/test_sourceparse.py::TestParseModuleNameAndSpec::test_GithubRefs yotta/test/test_sourceparse.py::TestParseModuleNameAndSpec::test_HGRefs yotta/test/test_sourceparse.py::TestParseModuleNameAndSpec::test_atVersion yotta/test/test_sourceparse.py::TestParseModuleNameAndSpec::test_validNames
yotta/lib/sourceparse.py
yotta/lib/sourceparse.py