Top "Preg-match" questions

Regular expression pattern matching function for the PHP programming language

Function eregi() is deprecated

Function eregi() is deprecated. How can i replace eregi(). I try with preg_match but then stop working. i us …

php regex preg-match eregi
Split String into Text and Number

I have some strings which can be in the following format sometext moretext 01 text text sometext moretext 002 text text 1 (somemoretext) …

php regex preg-match preg-split
How to check if string contains only specified character set?

I'm working on string and I wonder which way is best to check if string contains only specified character set: @ ∆ …

php string preg-match ereg
PHP: string to regex

I try use string as a regular expression pattern but I've following errors PHP Warning: preg_match(): Unknown modifier '&…

php regex preg-match
Regexp for german phone number format

I try to get phone numbers from string in german format. But I don't get it to full run. The …

java php regex preg-match preg-match-all
Regex Valid Twitter Mention

I'm trying to find a regex that matches if a Tweet it's a true mention. To be a mention, the …

regex twitter pattern-matching preg-match
How can I extract all anchor tags, their hrefs and their anchor text within a string?

I need to process links within an html string in several different ways. $str = 'My long <a href="http://…

php regex preg-replace preg-match domdocument
Regex for Any English ASCII Character Including Special Characters

I want to write a regex in php to match only any english characters, spaces, numbers and all special chars. …

php regex preg-match
PHP Regex to match the last occurrence of a string

My string is $text1 = 'A373R12345' I want to find last none digital number occurrence of this string. So …

php regex preg-match preg-split
Detecting emails in a text

I'm trying to create a function that translates every occurrence of a plain text email address in a given string …

php regex email preg-replace preg-match