This question already has answers here:
Comma Separated Numbers Regex
(6 answers)
Regular Expression to match dot separated list with no dot on the end and allow asterisk at the end
(3 answers)
c++ regexp allowing digits separated by dot
(2 answers)
Closed 4 months ago.
/^[0-9][0-9-.]*[0-9]+$/u
I am trying to match with these like codes:
1.11122.5454.545
55
555.55
65656.75454
Not 111..444 and not 44545...444
How can I stop more than 1 dots between numbers
Related
This question already has answers here:
Regular Expression for getting everything after last slash [duplicate]
(7 answers)
Regular Expression to collect everything after the last /
(8 answers)
Closed 2 months ago.
Get The Last Characters end with (/) in include.
The input string is: xxx/xx/xxx/YERpq9CifKTIC1g
The result that I want: /YERpq9CifKTIC1g
Try:
/\/[^\/]+$/
The theory being to match a / followed by any character that isn’t a / ([^\/]) until the end of the line ($).
This question already has answers here:
Matching an optional substring in a regex
(4 answers)
How do I make part of a regex match optional?
(2 answers)
Closed 1 year ago.
I have a string which contains both form $date0$ and ''$date0$'' (single ').
I am using this regex to match (\$([^\$]+)\$) but it's only matching $date0$.
What regex should I use that matches both?
This question already has answers here:
Understanding the negated character class
(3 answers)
Negative lookahead in regex to exclude percentage (%) in R
(3 answers)
Closed 2 years ago.
I have the string '05/'. If I write the pattern \d+[^\/]{1}, why does it still match the '05' part of the string? Shouldn't it be fully rejected since there is no match on the 3rd char requirement?
This question already has answers here:
RegEx validation of decimal numbers with comma or dot
(6 answers)
How to extract decimal number from string in C#
(7 answers)
Closed 2 years ago.
I've custom regex where I match float numbers.
Regex:
/[0-9]*\,?[0-9]*\.?[0-9]*/m
When I tried with string 1,5$+absd1.5a get 10 matches on result where 1 match == 1,5 and 8 match = 1.5. Other matches is empty. How I can match without empty results?
Demo
https://regex101.com/r/jnhsly/1
This question already has answers here:
Regular expression to get last 3 characters of a string
(2 answers)
Closed 5 years ago.
how to get last 3 or 5 digits from this given one using regex
4c113866bc43e2be48bbf85be829d7bc
Use $ anchor to mark the end of the string:
.{3,5}$
3 above is the min number of characters to match; 5 is max.