I have a string e.g. HRJSHR
and search for a way to find all possible permutations of A-Z
with the length of 2 or more letters. For example
- HR, RJ, JS, SH, HR
- HRJ, RJS, JSH, SHR
- HRJS, RJSH, JSHR
- HRJSH, RJSHR
- HRJSHR
|[A-Z]{2,}|
just returns the whole string "HRJSHR" and |[A-Z]{2}|
just that ones whith a length of 2 letters. |[A-Z]{2+}|
doesn't works.
Which regular expression will find all permutations of A-Z with a length of 2 ore more letters in the string?