Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6600659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:39:14+00:00 2026-05-25T18:39:14+00:00

I also tried [a-zA-Z]{2,}-\d+ but with the same results def verify_commit_text(tags): for line in

  • 0

I also tried [a-zA-Z]{2,}-\d+ but with the same results

def verify_commit_text(tags):
    for line in tags:
        if re.match('^NO-TIK',line):
            return True
        elif re.match('^NO-REVIEW', line):
            return True
        elif re.match('[a-zA-Z]-[0-9][0-9]', line):
            return True
        else:
            return False
if __name__ == '__main__':
    commit_text_verified = verify_commit_text(os.popen('hg tip --template "{desc}"'));
    #commit_text_verified = verify_commit_text(os.popen('hg log -r $1  --template "{desc}"'));
    if (commit_text_verified):
        sys.exit(0)
    else:
        print >> sys.stderr, ('[obey the rules!]')
        sys.exit(1);

if i use a text "JIRA-1234" the regex in :

 elif re.match('[a-zA-Z]-[0-9][0-9]', line):

does not seem to work and i get:

[obey the rules!]

on stdout.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:39:14+00:00Added an answer on May 25, 2026 at 6:39 pm

    The regex is working exactly as you’ve specified it .. it is searching for 1 character and 1 digit. You probably want something like

    re.match(r'[a-zA-Z]+-\d+\Z', line)
    

    Further, always prefix regular expression strings with an ‘r’ as in the above. Or it will bite you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have also tried .('refresh') and .page() to no avail. The text-box updates but
I have tried searching on Google and also read the documentation but no success.
I tried with no success: webBrowser1.Document.ExecCommand(alert('Hello World!'), true, null); also tried: private void webBrowser1_DocumentCompleted(object
UPDATE: I also tried implementing UITextViewDelegate delegate and then doing in my controller: -
I cannot figure out why appendChild is returning undefined. I also tried t.previousSibling.appendChild(document.createElement('span')); which
The following command causes an exception. cv::imwrite(test.jpg, diffImg); I also tried numerous variations on
xaml side: <DataGrid Name=MyGrid ItemsSource={Binding} /> I tried also with: <DataGrid Name=MyGrid ItemsSource={Binding MyObj}
I am using OpenOffice in my system and already I tried about it, also
I'm new in soapclient, I have tried to do some study online and also
This Monotouch code below will not cause an exception, but it also won't show

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.