How to group the following strings by regular expression

  • A+
Category:Languages

This is the string I want to process.(At least one of the underlined parts. The last part is never underlined )

'_A._B._C._D._F.f'` 

I expected

["A", "B", "C", "D", "F", "f"] 

How to achieve the same effect by regularity, I tried, but can't loop the same format part.

new RegExp('^[(_(.+)//.)]+(.+)$') 

 


How about that without using regex?

str = '_A._B._C._D._F.f'.split('.') var alphabets = str.map(c => c.replace('_', '')); console.log(alphabets);

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: