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

kanikakanika Posts: 198Member
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 Posts: 198Member
    Muchísimas gracias!!!
  • Slawek_GuzekSlawek_Guzek Posts: 1,554Member
    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 Posts: 198Member
    "in C419 File Management"
    what is this?
  • Slawek_GuzekSlawek_Guzek Posts: 1,554Member
    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 Posts: 198Member
    Ah ok!!! Sorry,

    CU419 thanks!!
Sign In or Register to comment.