I need to filter the text below from the string using Regex JavaScript
:
Text: 'http://www.mywebsiteameW1234.com'
Should return only: mywebsitename
So between character dots and only lowercase letters:
My attempt is only returning: mywebsitenameW1234 should remove the numbers:
let text = 'http://www.mywebsitenameW1234.com'
console.log(text.match(/(?<=\.)(.*)(?=\.)/gm)[0])
I tried several ways to try to filter instead of (.*) putting something like ([a-z]+) but always return null.
What am I doing wrong? Why can't I add those filters in between groups look ahead/behind, etc..?