If you want to replace the whole word with the word boundaries in a string. For this, we use "\b" regular expression token which is called a word boundary. It usually matches at the start or the end of a word.
This is a wonderful example to show you, how to create an expandable list view in android. I have learnt already in the previous article, how to create list view in android by Recyclerview. So now you can use ExpandableListView component to create a list