program for word deletion from a string | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

program for word deletion from a string

can you suggest a code to delete a word from a string

7th Feb 2017, 2:43 PM
Vishnu Sivan
Vishnu Sivan - avatar
2 Answers
+ 1
var input frase = "ll1ll2ll3ll5ll7"; ouput "12357"; PHP: str_replace("ll", "", $frase); JavaScript: frase.replace('ll', ''); Obs. Search more about replace!
7th Feb 2017, 9:36 PM
Jônatas Araripe
Jônatas Araripe - avatar
+ 1
thank you
8th Feb 2017, 3:07 AM
Vishnu Sivan
Vishnu Sivan - avatar