Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pedroka-dev/Regular-Expression-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

Introduction

A Python script that verifies if string is part of the determined regular expression or not. The script can accept other custom regular expression as param too, but for now only the expected expression is verified.

Regular expression Parameters

  • The tested regular expression is ^(?![a-z])[A-Z]([(a-z)|( )|(,)]*)([.]|[!]|[?])$
  • One sentence, with the first letter uppercase commas and spaces
  • The sentence can contain lettes, commas and spaces.
  • The sentence should not contain numbers, special characters or accents
  • The setence should end with exactly one period or one exclamation point or one interrogation point.

Examples of valid expressions:

"Be kind, for everyone you meet is fighting a harder battle."

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."

"Aaaaaaaaaaaaa."

"Aaaaaaaaaaaaa!"

"Aaaaaaaaaaaaa?"

"Aaaaaaa aaaaa aaaaaaa."

"Asafsafsafassaffsaafssfaasf."

"Aaaaaa,aaaaaaa."

Examples of invalid expressions:

"Invalid because cammelCase."

"AEIOU Invalid because multiple uppercases."

"INVALID BECAUSE UPPERCASE."

"Invalid because nummbers like 1 to 9."

"Invalid because multiple dots..."

"Invalid because multiple exclamations!!!"

"Invalid because #@#&*+- characters."

"Invalid because ÑóéíãáÒÒ characters."

About

πŸ†Ž A Python script that verifies if string is part of the determined regular expression or not.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /