$pattern
, array $input
[, int $flags
= 0
] )
Returns the array consisting of the elements of the
input
array that match the given
pattern
.
Anonymous user / 3.145.96.163 Log In Register |
?
Wallet:
3.00
Daily Credits:
1.20 / 1.20
|
This is your credit balance. Even if you are an anonymous user, you are given some credits to spend. Every IP address has its own account and it is provided with free credits that can be used to pay for Online Domain Tools services. Moreover, credit balance is reset every day. This is why we call them Daily Credits. Registered users have higher Daily Credits amounts and can even increase them by purchasing subscriptions.
Besides Daily Credits, all accounts, including IP address accounts of anonymous users, have their credit Wallet. Wallet credits are not reset on a daily basis, but they are only spent when a user has not enough Daily Credits. Registered users can buy credits to their wallets. All IP address accounts are created with an initial Wallet balance of 3.00. Once IP address account spends credits from its Wallet, it can not be charged again. This should allow new users to try most of Online Domain Tools services without registration.
$pattern
, array $input
[, int $flags
= 0
] )
Returns the array consisting of the elements of the
input
array that match the given
pattern
.
The pattern to search for, as a string.
The input array.
If set to PREG_GREP_INVERT
, this function returns
the elements of the input array that do not match
the given pattern
.
Returns an array indexed using the keys from the
input
array.
Example #1 preg_grep() example
<?php
// return all array elements
// containing floating point numbers
$fl_array = preg_grep("/^(\d+)?\.\d+$/", $array);
?>
Version | Description |
---|---|
4.2.0 |
The flags parameter was added.
|
4.0.4 |
Prior to this version, the returned array was indexed regardless of
the keys of the If you want to reproduce this old behavior, use array_values() on the returned array to reindex the values. |