@LINQ challenged me to write a regular expression to recognize the following language L :
I was able to build on this premise the following finite state machine:
Miguel Angelo has detected a typing error in the AFD...
How to create a regular expression to validate the phone field that accepts
99-99999999 (DDD + 8 numbers) or 99-999999999 (DDD + 9 numbers). And when typing it add the - dash automatically!
ValidationExpression="^[0-9]{2}-([0-9]{8}|[0-9]{9})...
In several regex I noticed some symbols that do not seem to be part of the catch but some kind of functionality. I would like to know the name or term of these symbols and what is the functionality of each one.
?:
?=
?!
?<=
?<!
Let's say I wanted to do something like this question
How to convert CamelCase to snake_case in C #?
Convert CamelCase to snake_case in C #
You had some answers, but I want to highlight these two.
Answer 1
string stringSnake =...
This is an intentional question, because I see many people using \s in regex thinking their meaning is ' ' (space) because I tell them, it is not, at least not only that.
But what does \s mean in REGEX?
I have the following string :
var str = "00000.00000 111111111.111111111111 33333333"
I need to remove the extra spaces for it to be like this (only with 1 space):
var str = "00000.00000 111111111.111111111111 33333333"
How do I pro...
I have a field in the SQL Server 2014 database that stores the client address. The problem is that everything was stored in a single varchar field.
Here are some real examples:
Antonio José Nerchis Street, 81
Street: Guaira /...
A long time ago, I took a look at using boundary , studying about regular expressions in PHP (PCRE Patterns).
I came across the \b (which is called boundary).
How useful is it in a regular expression?
I have a List of directories that is sorted by name:
List<DirectoryInfo> dirs = parentdir.GetDirectories().OrderBy(c => c.Name).ToList();
The problem is that I have folders whose names are numbers separated by periods (as if...
I'm trying to understand the difference in use of these two class methods Matcher , but I could not quite understand the description of the documentation that says:
public boolean matches ()
Attempts to match the entire region agains...