I have a string conforming to the following pattern:
(cc)-(nr).(nr)M(nr)(cc)whitespace(nr)
where cc
is artbitrary number of letter characters, nr
is arbitrary number of numerical characters, and M
is is the actual letter M.
For example:
ASF-1.15M437979CA 100000
EU-12.15M121515PO 1145
I need to find the positions of -
, .
and M
whithin the string. The problem is, the leading characters and the ending characters can contain the letter M
as well, but I need only the one in the middle.
As an alternative, the subtraction of the first characters (until -
) and the first two numbers (as in (nr).(nr)M...
) would be enough.