I've been struggling whole day to get what I want. Maybe you can help me. Let's say I have a string DT JJ NN IN JJ JJ NN NNS IN, ideally, for needed result I would write a regular expression something like this: (<NN.*> +)|(<NN.*> +<JJ.*> *)|(<JJ.*> *<NN.*> +) I want to get a result like all possible combinations, by the example would be like: NN NN NNS JJ NN JJ JJ NN JJ JJ NN NNS JJ NN JJ NN NNS NN NNS Maybe I am seeking for impossible or should change an attitude. I don't know. Please share any ideas. Thanks in advance! Continue reading...