79403906

Date: 2025-01-31 20:13:57
Score: 1.5
Natty:
Report link

Does this work for you?

Let ([
    // test input. Put your real input here:
    ~serial = "12345P382M45" ;

    ~stripped = Right ( ~serial ; Length ( ~serial ) - 6 ) ;
    ~letter = Left ( Filter ( ~stripped ; "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM" ) ; 1 ) ;
    ~pos = Position ( ~stripped ; ~letter ; 1 ; 1 ) ;
    // I'm not sure what you want to happen if there are no letters
    // but this will return EVERYTHING after the first 6 digits in
    // the absense of letters(~pos == 0)
    ~res = If (
        ~pos > 0 ;
        Left ( ~stripped ; ~pos - 1 ) ;
        ~stripped
    )
];
    GetAsNumber ( ~res )
)
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: bruderdog