This is a problem that the WEST can never solve. Not Western Europe, not the USA, not NATO, not the UN. This problem must be solved by the government leaders of the countries who harbor these extremists and allow them to operate and proliferate. They will out-wait and outlast any attempts from outside forces to defeat them, as we have seen over and over in the last few decades.
What the West can do is isolate those countries and pen them in, until those leaders make it happen. Yes, that'll result in many "good" people suffering along the way, but following the present strategy is clearly not working. The level of hatred that these extremists harbor against anyone not directly in line with their beliefs is unimaginable to those of us outsiders. Unfortunately, this is not a war that can be won with any substantial level of compassion. We'll be fighting it this way for many, many generations if the strategy remains the same.