Regular expression rejecting 0 and 0.0 [closed] - regex

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
Can anyone Please help me to find a regular expression that reject values 0 and 0.0 and accept any other values?

^(?!0(?:\.0)?$).*$
See the demo

Related

Has anyone a working regex for telephone numbers german and austria? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
Improve this question
https://regex101.com/r/hntg9i/1
like for +43 and +49 a working regex, mine is not working
In my regex the numbers are also matched and not only just the telephone numbers.
Has anyone a solution to that?

How can I check if user input contains a letter? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
In Ruby, I want to see if user input contains any letter in the alphabet.
I have tried using contains and include?, but neither of these worked.
See String#include?
For example:
myString.include? 'a'
Similar to the comment from Cary: use a regular expression (regexp):
puts ‘matches’ if in_str =~ /[A-Za-z]/
See also: https://ruby-doc.org/core-2.7.1/Regexp.html

For loop fails, but code appears to be correct [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
My code looks fine to me, but I'm getting a syntax error in my for loop. Does anyone know why this would be the case? I've included my code below:
def printLine(numberOfDots):
dots = 0
for x in range numberOfDots:
dots += 1
printDots = print("." * dots)
return printDots
printLine(20)
range is a function, so you should use range(numberOfDots) instead of range numberOfDots.

Regex pattern matching [ ] [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I need to match a pattern such as this [1712][***matchhere***] where I just need the text between the second set of [ ].
Here is the pattern:
/\[\d+\]\[(.*)\]/
You may use sites like https://regex101.com/ to test your patterns.

strange regex experasion [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I've got a quick harmless question...
what does this expression mean:
/(^|[\s\0])/g
Try it out on regex101.com, looking on the right side:
Hope you can see this ok and can grok it.