I have a string of the following form "some_text_AAAABB_some_other_text". There is an arbitrary even number of 'A's in the string and "BB" is a fixed string that follows the 'A's. Assuming that there is I have a string of the following form "some_tex