Open lukepighetti opened 2 years ago
seems duplicated to https://github.com/actions-ecosystem/action-regex-match/issues/158
use .+?
instead of \d+
/<a [^>]\bhref\s=\s"([^"]vercel.app[^"]*)/
This is not working for me @kaisugi @lukepighetti
seems duplicated to #158 use
.+?
instead of\d+
.
and \d
are not the same delimiters
It seems like the issue is that group1
can be empty while match
contains a value. I used this code to extract the version name from a git tag (v1.5.5+157):
- name: 'Extract version name from tag'
uses: actions-ecosystem/action-regex-match@v2
id: version-name
with:
text: ${{ env.VERSION_NAME }}
regex: '[0-9]+\.[0-9]+\.[0-9]+' # https://regexr.com/
When I printed out the results, group1
is blank and match
contained the correct value (1.5.5):
- name: 'Print extracted values'
run: |
echo ${{ steps.version-name.outputs.group1 }} // ''
echo ${{ steps.version-name.outputs.match }} // '1.5.5'
Hello, I tried to use this to extract
1.0.0
fromrefs/heads/release/1.0.0
, but failed.This outputs
echo 'refs/heads/release/1.0.0'
echo ''
This regex was crafted with https://regex101.com in JavaScript mode