Question : Function to Return Only Numbers in a String

Is there a function in SQL Server to output only numbers in a string.  For example, if given "12A45B" the function would return "1245".

Answer : Function to Return Only Numbers in a String

Here's the quick script to get all files from the directory:

if ($handle = opendir($directory_name)) {
    while (false !== ($file = readdir($handle))) {
        if ($file != "." && $file != "..") {
            $out[] = $file;

Replace $directory_name with the path to the folder you want to search within.
After this code has been executed you will have array called $out which will store all files within the provided directory.

What you can do now - once you've submitted the search form with the value is:

if (isset($_GET['keyword'])) {

$keyword = $_GET['keyword'];

if (!empty($out) && in_array($keyword, $out)) {
echo "File has been found";
} else {
echo "File has not been found";


I hope this helps
Random Solutions  
programming4us programming4us