You can use a regular expression for this.
See
C++ Regular Expressions with std::regex[
^]
Example of regular expression that will pick out the number strings from the input data.
/OFCI(?<group1>\d+(\.\d+)?)/OFGI(?<group2>\d+(\.\d+)?)
The expression \d+(\.\d+)? will put a number of the format 1111.222 or 111 into a group.
This part (\.\d+)? means it is optional.