Skip to content
Advertisement

How to extract words of constant length form a paragraph?

I’m trying to extract the words form a paragraph/string. I searched it out many where but didn’t find relative material. I want to extract words of length 4 from

“I want to have alot of moneys when I am older probably e1X2”

I’m trying to extract using

JavaScript

The output which am I getting right now

JavaScript

but the output must be

JavaScript

Advertisement

Answer

The simpler way to get the result :

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement