Regular expression for 1 or more [closed] - regex

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 8 years ago.
Improve this question
What is the a regular expression to only allow whole numbers from 1 through 99? (including both 1 and 99)

Try this:
^[1-9][0-9]?$
The ? means that the previous token is optional.
The ^ and $ are anchors for the start and end of the string respectively.

Surely you mean
[1-9][0-9]?

Related

How to “inverse match” with regex without content? [closed]

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 4 years ago.
Improve this question
I have read How to "inverse match" with regex? and i would like to know if i can apply it to a non-content regex. In particular i'm talking about: ^[A-z0-9+\/]{44}$
I tried https://regex101.com/r/NmOs7Z/1 but it does not work
I didn't get exactly what you really, but from my understanding you want to match the two lines in your demo
So what i did :
^(?![a-zA-Z0-9+\/]{44}).*$
Demo

Regex exclude &# [closed]

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 6 years ago.
Improve this question
How to determine that string doesn't contain both symbols &# together using regular expression ?
You can use a negative lookahead:
/^(?!.*&#)(.*)/m
Demo

Regex Expression Required [closed]

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 7 years ago.
Improve this question
i am new to this regex thing, how can we build regex expression for following thig
input==>[User:1490474408:michaelayliffe]
output should be ==>1490474408
input will be anything like below:
1.[User:1490474408:michaelayliffe]
2.[User:12345:dfhdfhdf]
3.[User:56789:utyutyutyu]
Output should be middle value.
Please reply.
(?<=\[User:)[^:]+
Using lookbehind should work for you.
/\d+/g
It is find digits those are middle of your string

Regex pattern to not equal 0 [closed]

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 7 years ago.
Improve this question
I want to pass values those are not equal zero (0). What is the best performing regex pattern for this ?
[^0]+
Means: Any character besides zero must occur at least once

regex: check if values exist in between commas [closed]

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 8 years ago.
Improve this question
In Perl, I would like to determine if a given string is valid, the rule is to check if values exist between commas.
e.g. abc,abc is a valid case, but abc, or abc,,abc are not.
m/^\s*,|,\s*,|,\s*$/
matches all invalid combinations, assuming whitespace does not count as "values".