Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I need a hand creating a regular expression for .net that matches a comma separated list of years
Examples:
1990
1985,1990,2004
Year range between 1900 and 2100
Year range between 1900 and 2100
^(?:19\d\d|2(?:100|0\d\d))(?:,(?:19\d\d|2(?:100|0\d\d)))*$
DEMO
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I am trying to create a validation expression for a table name in the format of:
Name_TableName_YYYYMMDD
right now I have something like this:
^[a-zA-Z0-9][^_]+[a-zA-Z0-9][^_]+\d{8}
Number at the end can read 8 digits.
You could try this (very basic) expression
[a-zA-Z]+_[a-zA-Z]+_[0-9]{4}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])
Link to a test
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
We have for egz. 4.7(8+3) how add multiple character between digit and bracket4.7*(8+3)
Capture digit followed by bracket into two groups, then replace matched value with group values and multiple character between them:
Regex.Replace(input, #"(\d)(\()", "$1*$2")
For input "4.7(5+(8+3)/1(1-2))" result will be "4.7*(5+(8+3)/1*(1-2))"
Keep it simple: REplace ( by *(
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
How can one remove the quotes in between quotes using Regex?
Say for the following string:
String sb233="\"DB\"|\"FB_\"ID\"|\"INV_\"ID\"|\"%T001\"|\"%T0\"16\"|\"OWNER_KEY\"|\"VEND_LABL\"|\"INV_KEY\"|\"FB_KEY\"|\"FB_AP\"P_AMT\"|...
The desired result:
String sb233="\"DB\"|\"FB_ID\"|\"INV_ID\"|\"%T001\"|\"%T016\"|\"OWNER_KEY\"|\"VEND_LABL\"|\"INV_KEY\"|\"FB_KEY\"|\"FB_AP\"P_AMT\"|...
Try this
(?<!\||^)\\"(?!\|)
Regex Demo
Input
\"DB\"|\"FB_\"ID\"|\"INV_\"ID\"|\"%T001\"|\"%T0\"16\"|\"OWNER_KEY\"|\"VEND_LABL\"|\"INV_KEY\"|\"FB_KEY\"|\"FB_AP\"P_AMT\"|...
Output:
\"DB\"|\"FB_ID\"|\"INV_ID\"|\"%T001\"|\"%T016\"|\"OWNER_KEY\"|\"VEND_LABL\"|\"INV_KEY\"|\"FB_KEY\"|\"FB_APP_AMT\"|...
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have two records in my view in SQL
Now I have to show one record in my grid in which ledgername xxx xxx(1685) has minimum time in TimeIn and maximum time in TimeOut I have the following things..
With your brief question I will give a couple of pointers: GroupBy, Select, Min, Max
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Usernames Yes/No
“6789” Yes
“33333333_TL” No
“34567890-Shhh” No
“123456-Hero” Yes
“1234567” Yes
“New12345678” No
“87456773kk” No
“1234567890” No
See Regex to check for 4 consecutive numbers.
First check if your string's length >= 8 and then use a regex to look for N consecutive digits and if it finds a fit - your validation fails. Something like - /[^\d]\d{8}[^\d]/