answersLogoWhite

0

Use the preg functions (ereg functions are deprecated)

Wiki regex to form your regex string

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

How can you use the OR condition in PHP validation in regular expressions?

You use instead of OR


Can you use Perl regular expressions in PHP?

Yes, by using the preg_match() function


How do you use regular expression in web mining?

Regular expressions can be used to find patterns within data. Beyond that the subject of Regular expressions gets extremely complicated very fast, I suggest you purchase a book on the subject and read it... twice.. http://www.amazon.com/Mastering-Regular-Expressions-Jeffrey-Friedl/dp/0596528124/ref=sr_1_1?ie=UTF8&qid=1345423498&sr=8-1&keywords=regular+expressions


What is the use of a question mark in php?

It is used to tell the sever to use the PHP parser. To begin php you must use <?php, and to end it, it is ?>.


How do you use PHP in HTML?

You can't use PHP in an HTML document, but you can use HTML in PHP script.


How do you scrape websites using PHP?

You use file_get_contents to fetch the website HTML and regular expressions to get what you need from that. eg: $html = file_get_contents('http://www.yoursite.com'); preg_match_all(<regular expression here>, $html, $matches); print_r($matches); // this will contain what you need If you require cookies or special http headers, you might want to look at cUrl functions in stead of file_get_contents.


What is a regular expression in PHP?

echo or print < both of which write text: <?php echo "TEXT"; print "TEXT"; ?>


What are regular expressions?

py4everybody regular expression answers autograde 11.2


What is the relationship between regular expressions and context-free grammars?

Regular expressions and context-free grammars are both formal languages used in computer science to describe patterns in strings. Regular expressions are simpler and more limited in their expressive power, while context-free grammars are more complex and can describe a wider range of patterns. Regular expressions can be converted into context-free grammars, but not all context-free grammars can be represented by regular expressions.


Is there is any function or class in Java to check inputed string is valid char sequence and no numbers or any special char are there?

You should probably use regular expressions. For example, the following will check that the String s has only English (Latin) characters in it:boolean hasOnlyLatin = s.matches("^[a-zA-Z]*$");Learning to use regular expressions is scary at first, but worthwhile. See the related links for some information about regular expressions in Java.


What is the complement of a regular language and how does it relate to the concept of regular expressions?

The complement of a regular language is the set of all strings that are not in the original language. In terms of regular expressions, the complement of a regular language can be represented by negating the regular expression that defines the original language.


Why should you use PHP and not JSP?

Firstly, this is wrong question. The right one would be WHEN should you use PHP, not JSP? or, WHEN should you use PHP and WHEN JSP?