I have
[1] "000010004" "011120000" "002030000" "000300020" "003000020" "001000040" "000030020" "000010112"
[9] "050000000" "000000041" "001020020" "001030001" "001000130" "000000050" "000120020" "000500000"
using grep I want to find all groups (string inside "" is a group) that contain
a. subgroup 2,3 (means: ...2...3... and ...3...2...)
b. subgroup 1, 1, 1, 2 (means: ...1...1...1...2 and 1...1...2...1... etc etc)
Order doesnt matter, but frequency does. Meaning for a) 2 and 3 each should just appear once.
thanks for help
1,2
in the input string?