I Want to Add a " Maching Searched Result Count " On This Code. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I Want to Add a " Maching Searched Result Count " On This Code.

https://code.sololearn.com/Wiw9DQK1C5hm/?ref=app I Want to add a javascript, for Searching Result : How many search Results Maching ??? If i Add a word like a " ABC " in search bar it's show me : Searched Result is : 1

15th Apr 2021, 3:53 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
9 Answers
15th Apr 2021, 4:54 AM
A͢J
A͢J - avatar
+ 3
AYESHA NOOR If you want number of words then you will have to enter full name otherwise you will not get. See here https://code.sololearn.com/WLC7pUYTFMFw/?ref=app
15th Apr 2021, 5:49 AM
A͢J
A͢J - avatar
+ 1
I don't need Console-log, i want a result option top on the screen.
15th Apr 2021, 4:20 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
+ 1
But i need a words counting option... not a list. Thanks for advising..... 😊
15th Apr 2021, 5:53 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
+ 1
Ayesha, Did you make your search work? Here is the one way to solve it: https://code.sololearn.com/WZJdIJZGj3Gw
24th Apr 2021, 1:04 PM
ボリス
0
It only tells the list number, not the total number of words. I need to know the total number of words.
15th Apr 2021, 5:36 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
0
Ayesha Noor, did you try to use JavaScript RegExp Object? https://www.w3schools.com/jsref/jsref_obj_regexp.asp var patt= /abc/ig //'i' = case-insensitive, 'g'= global match (finds all matches) and then use of .length method of the result will give you the count of items found in one line. it worked after little modification of w3school's 1st example.
16th Apr 2021, 5:00 PM
ボリス
0
*¥₩£€££$**♤○◇~》₩¥€?*&$#€?
17th Apr 2021, 12:56 AM
Angel Mie Romero
Angel Mie Romero - avatar
0
Ayesha, Here is another try for find and replace -version. https://code.sololearn.com/WTyV3PxolGDI
25th Apr 2021, 11:12 AM
ボリス