Is there a strpost in reverse? (extract text from right side)

kanikakanika Member Posts: 247
edited 2018-07-17 in NAV Three Tier
If strpos find the first ocurrence of substring within a string but I need the last ocurrence.

Is there a function?

for example:

string:= 'file://\\Client\I$\INFORMES D&B\BGREEN BIOLOGICAL SYSTEMS SL.htm'

I need to extract 'BGREEN BIOLOGICAL SYSTEMS SL.htm'

but i need to find the last '\'

the string is variable because they are addresses of linked files

Thanks for advance!!!

Best Answer

Answers

  • kanikakanika Member Posts: 247
    Muchísimas gracias!!!
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Why re-inventing the wheel? Check the GetFileName() function in C419 File Management..
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • kanikakanika Member Posts: 247
    "in C419 File Management"
    what is this?
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Codeunit 419 File Management
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • kanikakanika Member Posts: 247
    Ah ok!!! Sorry,

    CU419 thanks!!
Sign In or Register to comment.