I would like to extract and print two patterns of a string
My file has hundreds of lines of text but here are two of them. Each line has a marker F1, F2, F4, F4, F5, F6, and F7 and each of these markers is followed by 4 characters.
F1A308F2A309 F3A310F4A311 F5A312F6A313F7A314 F1B308F2B309 F3B310F4B317 F5B312F6B313F7B315
I would like to extract the 4 characters after the pattern "F2" and the 4 characters after the pattern "F6" so that the output is
A309 A314 B309 B313
To clarify further I need to extract only the characters following F2 and F4.