Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/api 315 all caps new projects and programs #218

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

jesuspguofc
Copy link

Renamed branch.

@@ -36,6 +36,7 @@ properties:
name:
type: string
description: "Full name/title of the program."
pattern: "^[A-Z0-9]+|[0-9]+|[A-Z]+$"
Copy link
Contributor

@philloooo philloooo Aug 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this saying the name should start with uppercase alphabetical or number and end with only uppercase alphabetical? that's a weird requirement

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Phillis, it is saying that we can have project names with numbers or uppercase characters only, it is hard to see but there are pipes (or's) in between. Probably there is a better why of structuring this. I am open to suggestions :)

import re
pattern = "^[A-Z0-9]+|[0-9]+|[A-Z]+$"
re.match(pattern, "A")
<_sre.SRE_Match object at 0x7efea15d9370>
re.match(pattern, "9")
<_sre.SRE_Match object at 0x7efea15d93d8>
re.match(pattern, "999")
<_sre.SRE_Match object at 0x7efea15d9370>
re.match(pattern, "AAAA")
<_sre.SRE_Match object at 0x7efea15d93d8>
re.match(pattern, "9AAAA")
<_sre.SRE_Match object at 0x7efea15d9370>
re.match(pattern, "A9AAAA")
<_sre.SRE_Match object at 0x7efea15d93d8>

However I just found another bug, thanks for asking!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify, I need to add the $ symbol to the other 2 options, to signify that no other trailing characters are allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants