I was trying to match "kit - kat" or "kit-kat" for one of my ElasticSearch project.
and I wanted it to become "kitkat". So i was writting an char_filter.
To achieve the above mentioned result i was writing a Regular Expression in https://regex101.com
First i wrote a REGEX which looked like this "(\S+)[ |-|_]*".
It didn't worked as expected (wrong expectation!).
But when i did this it worked "(\S+)[ |\-|_]*".
What is the meaning of - in []?