N
N
nightsamurai2018-03-15 23:09:29
PHP
nightsamurai, 2018-03-15 23:09:29

Can preg_match break if the string is too long?

Hello, I have a very simple regex
preg_match('/^(\d+,?)+$/', $myStr);
Problem: The
regex should check if the string matches the format - number (1 or more) comma (0 or 1)
Everything works as intended until the length of the string goes beyond a certain value
In my case, the string consists of 22 and you with symbols

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
index0h, 2018-03-16
@index0h

Can preg_match break if the string is too long?

Yes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question