Split String by last

HI All,

Can anyone suggest me on below split

Input= Hi_I_want_to_split.xlsx
expected output=Hi_I_want_to

no. of underscore is not fixed. I need all text of last underscore

1 Like

@TUSHAR_DIWASE

Try below expression.

           Input.SubString(0, Input.LastIndexOf("_"c))
2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.