in Education by
I m trying to use following pattern 65465465465654 6546465465465465 5646545646464 6545646456 6454646456 in text area please anyone help me to check preg_match pattern for the above input type I want to take mobile numbers separated by the next line character. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Try this: $numbers = "65465465465654 6546465465465465 5646545646464 6545646456 6454646456"; preg_match_all("/([0-9]*)\n/", $numbers, $resultArray); foreach ($resultArray as $result) { preg_replace("/\n/", "", $result); } Output: array(4) { [0]=> string(14) "65465465465654" [1]=> string(16) "6546465465465465" [2]=> string(13) "5646545646464" [3]=> string(10) "6545646456" }

Related questions

+1 vote
    Which operator is used to continue the definition of macro in the next line in C-Programming?...
asked Nov 9, 2020 in Technology by JackTerrance
0 votes
    been working on some database data calling into a .php file. The php file contains an "Add" button ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I just added a textarea to my page which is an "include" to another page...I have some script ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    I just added a textarea to my page which is an "include" to another page...I have some script ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
0 votes
    Which of these class have only one field TYPE'? (a) Void (b) Process (c) System (d) Runtime ... java programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    I am trying to replace all characters that are not C, T, A or G with an N in the sequence part ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    Which line numbers are further away from the plot? (a) Lower (b) Higher (c) Medium (d) Simple This ... Networks of R Programming Select the correct answer from above options...
asked Feb 10, 2022 in Education by JackTerrance
0 votes
    . 4. Click on the how you want the line numbers to appear. of each line Select the correct answer from above options...
asked Dec 23, 2021 in Education by JackTerrance
0 votes
    Calculate the electric field intensity of a line charge of length 2m and potential 24V. (a) ... proposed by,electromagnetic theory engineering physics,electromagnetic theory nptel...
asked Nov 11, 2021 in Education by JackTerrance
...