answersLogoWhite

0


Best Answer

You use instead of OR

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can you use the OR condition in PHP validation in regular expressions?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can you use Perl regular expressions in PHP?

Yes, by using the preg_match() function


How do you use regular expressions in PHP?

Use the preg functions (ereg functions are deprecated) Wiki regex to form your regex string


How does form validation differ in JavaScript and PHP?

In JavaScript the validation is done client side, which means it can be easily bypassed by turning JavaScript off in your browser. But with PHP it is server side, which means you can't switch it off, so you can't bypass the validation.


What is a regular expression in PHP?

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


Php Source code for validation?

If you wish to check the syntax of your source code, you need to run the code through the PHP CLI with the -l option. There are also some online resources to validate the syntax. This will check only the syntax of your file. This will not however detect runtime errors or logic errors. You must absolutely run the script for the best possible code validation.


What is the regular price of suzuki raider 150 in the Philippines?

Php 92,000.00


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 mean php expression?

PHP is a programming language. An "expression" is anything that can be evaluated (calculated) to get (among other things) a number. For example, numbers themselves; variables that represent numbers; calculations that result in a number (additions, subtractions, etc.), are all numeric expressions.


What is regular expressions?

In programming, a regular expression is an expression that explains a pattern for a string. A string matches a regular expression if that string follows the pattern of that regular expression. For example, you may want to create an account system, allowing usernames to only have uppercase and lowercase letters, and numbers. While a user is registering, you can check their desired username against a regular expression involving only alphanumeric characters (A-Z, a-z, 0-9). If it matches, then the username is valid to your requests. If it does not, the user has put in a character that does not follow the pattern of the regular expression. In regular expressions, you can match certain characters, match a certain quanity of characters, match the casing of characters (or just ignore it overall), and plenty more. The syntax of a regular expression varies throughout every programming language, but Perl is often used due to its wide variety of options. Perl is also incorporated into many web languages, such as PHP, making regular expressions less of a hassle. This is an example of a Perl regular expression, allowing a string with only alphanumeric characters (any character case), and an infinite length (except for a string with no length or no characters, in which the regular expression does not match the string): /^(?i)[a-z0-9]+$/


What is a regular expression?

In programming, a regular expression is an expression that explains a pattern for a string. A string matches a regular expression if that string follows the pattern of that regular expression. For example, you may want to create an account system, allowing usernames to only have uppercase and lowercase letters, and numbers. While a user is registering, you can check their desired username against a regular expression involving only alphanumeric characters (A-Z, a-z, 0-9). If it matches, then the username is valid to your requests. If it does not, the user has put in a character that does not follow the pattern of the regular expression. In regular expressions, you can match certain characters, match a certain quanity of characters, match the casing of characters (or just ignore it overall), and plenty more. The syntax of a regular expression varies throughout every programming language, but Perl is often used due to its wide variety of options. Perl is also incorporated into many web languages, such as PHP, making regular expressions less of a hassle. This is an example of a Perl regular expression, allowing a string with only alphanumeric characters (any character case), and an infinite length (except for a string with no length or no characters, in which the regular expression does not match the string): /^(?i)[a-z0-9]+$/


What is 10 percent in Php 250?

Answer: Php 2510% of Php 250= 10% * Php 250= 0.10 * Php 250= Php 25


What is a php consultant?

PHP Consultant is a Expert PHP Developer who Guide PHP Development Process