I have a PHP regEx, how do add a condition for the number of characters?

前端 未结 5 1794
臣服心动
臣服心动 2021-01-27 02:00

I have a regular expression that Im using in php:

$word_array = preg_split(
    \'/(\\/|\\.|-|_|=|\\?|\\&|html|shtml|www|php|cgi|htm|aspx|asp|index|com|net|o         


        
5条回答
  •  耶瑟儿~
    2021-01-27 02:26

    How about trying preg_match() instead of preg_split()?

    The pattern (using the Assertions):

    /([a-z0-9]{3,})(?

    The function call:

    $pattern = '/([a-z0-9]{3,})(?

    You can try the function here: functions-online.com/preg_match_all.html

    Hope this helps

提交回复
热议问题