Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
31blabla2020 is ok but 31blabla202020 was not acceptable before I could create the control statement on the regex. I want your help please.

What I have tried:

((([1-9])|([12][0-9])|(3[01]))(\w+)([12][0-9][0-9][0-9]))
Posted
Updated 18-Sep-20 10:35am
v2

Add a start and end of string:
^...$
Get a copy of Expresso[^] - it's free, and it examines and generates Regular expressions.
 
Share this answer
 
Comments
aydin.harun 18-Sep-20 16:39pm    
Thanks for recommending Expresso. The problem was solved with the expression I created.
OriginalGriff 18-Sep-20 17:22pm    
You're welcome!
Just a few interesting links to help building and debugging RegEx.
Here is a link to RegEx documentation:
perlre - perldoc.perl.org[^]
Here is links to tools to help build RegEx and debug them:
.NET Regex Tester - Regex Storm[^]
Expresso Regular Expression Tool[^]
RegExr: Learn, Build, & Test RegEx[^]
Online regex tester and debugger: PHP, PCRE, Python, Golang and JavaScript[^]
This one show you the RegEx as a nice graph which is really helpful to understand what is doing a RegEx: Debuggex: Online visual regex tester. JavaScript, Python, and PCRE.[^]
This site also show the Regex in a nice graph but can't test what match the RegEx: Regexper[^]
 
Share this answer
 
(([1-9])|([12][0-9])|(3[01]))([a-zA-ZİÜĞŞÇÖ]+)([12][0-9][0-9][0-9])


I designed such an expression with expresso. Problem solved. Thank you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900