Hi,
I am new to regular expressions and have been given the following regular expression:
var reg = new Regex(@"^[\s\p{L}•-]");
- I know that \p{L} matches a single code point in the category "letter".
- I know that \s metacharacter is used to find a whitespace character.
- I know that this regexp is to check if a line starts with a whitespace, a letter, the bullet character or the - character.
But if I need to check also if a line starts with a number this is the solution?
var reg =newRegex(@"^[\s\p{L}•-[1-9][0-9]?$|^100$]");
On https://regex101.com/r/j8oH20/1 I have pattern error.
All the errors detected are listed below, from left to right, as they appear in the pattern.
- Character range is out of order
Can someone help me?
Any help would greatly appreciate.
Thank you.