Top "Preg-match" questions

Regular expression pattern matching function for the PHP programming language

how to remove multiple slashes in URI with 'PREG' or 'HTACCESS'

how to remove multiple slashes in URI with 'PREG' or 'HTACCESS' site.com/edition/new/// -> site.com/edition/…

php .htaccess preg-replace preg-match preg-split
How to return only named groups with preg_match or preg_match_all?

Example: $string = "This is some text written on 2010-07-18."; preg_match('|(?<date>\d\d\d\d-\…

php regex preg-match
PHP regular expression to match a filepath

Can someone please help me with this preg_match if (preg_match('~[^A-Za-z0-9_\./\]~', $filepath)) // Show Error message. …

php regex preg-match
preg_match() and username

function isUserID($username) { if (preg_match('/^[a-z\d_]{2,20}$/i', $username)) { return true; } else { return false; } } Easy one.., i have …

php regex preg-match
preg_match with international characters and accents

I would like to validate a string with a pattern that can only contain letters (including letters with accents). Here …

php preg-match non-ascii-characters
php preg_match return position of last match

With preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE); is it possible to search a string in reverse? ie. return …

php regex preg-match
How to validate that a string only contain lowercase letters?

I'm trying to verify that my string matches a pattern. That is, the full string can be written as that …

php regex string validation preg-match
Is there a way to pass another parameter in the preg_replace_callback callback function?

mmmh guys, i really hope my english is good enaught to explain what i need. Lets take this example (that …

php preg-replace preg-match preg-match-all preg-replace-callback
PHP preg_match_all limit

I'm using preg_match_all for very long pattern. when run the code, i got this error : Warning: preg_match_…

regex preg-match preg-match-all php
PHP preg_match UUID v4

I've got a string that contains UUID v4 $uuid = 'http://domain.com/images/123/b85066fc-248f-4ea9-b13d-0858dbf4…

php preg-match uuid