Regex pattern matching [ ] [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 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.

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

Regular expression rejecting 0 and 0.0 [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
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

Regex - finding strings between signs [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 was trying to solve this by myself but there are only solutions for cases like that:
"text" "text2" "text3"
I need to write a pattern which takes strings starting with '-' sign, expected result is shown below:
Input:
-something/3443/kk-somethingelse/111/333/zz
-text/ff/33/33/zz
Output:
1. something/3443/kk
2. somethingelse/111/333/zz
3. text/ff/33/33/zz
as individual grups.
Thanks in advance and sorry I couldnt manage that.
Try this pattern, with global flag:
-([^-\s]+)
Demo link
I would exclude line breaks as well:
-([^-\r\n]+)

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.