Hello,</span></span></span> </span>I have a string something like this: <span style="mso-spacerun: yes;"> </span>“MyFirstName_SecondName_2_c93adea6_948_49549f23_d6e.txt”. </span></span></span>I wish to remove the string “_2_c93adea6_948_49549f23_d6e.txt” </span>i.e. the string from last <span style="mso-spacerun: yes;"> </span>5underscores (“_’) and wish to keep “MyFirstName_SecondName”. The 'part to keep' may not have any underscore(e.g. MyFirstName only) </span></span></span> </span>I have spent lot of time but I am not able to write customized function which can substring the string as per my requirement.</span></span></span> </span>Regards,</span></span></span>Sachin</span></span></span>
I have a string something like this: “MyFirstName_SecondName_2_c93adea6_948_49549f23_d6e.txt”. I wish to remove the string “_2_c93adea6_948_49549f23_d6e.txt” i.e. the string from last 5 underscores(“_’) and wish to keep “MyFirstName_SecondName”. The part to keep may not have any underscore(e.g. MyFirstName only)
I have spent lot of time but I am not able to write customized function which can substring the string as per my requirement.
Tricky String Manupulation!
Hello,</span></span></span> </span>I have a string something like this: <span style="mso-spacerun: yes;"> </span>“MyFirstName_SecondName_2_c93adea6_948_49549f23_d6e.txt”. </span></span></span>I wish to remove the string “_2_c93adea6_948_49549f23_d6e.txt” </span>i.e. the string from last <span style="mso-spacerun: yes;"> </span>5 underscores (“_’) and wish to keep “MyFirstName_SecondName”. The 'part to keep' may not have any underscore(e.g. MyFirstName only) </span></span></span> </span>I have spent lot of time but I am not able to write customized function which can substring the string as per my requirement.</span></span></span> </span>Regards,</span></span></span>Sachin</span></span></span>
Hello,
Sorry for the previous post. Its not readable.
I have a string something like this: “MyFirstName_SecondName_2_c93adea6_948_49549f23_d6e.txt”.
I wish to remove the string “_2_c93adea6_948_49549f23_d6e.txt” i.e. the string from last 5 underscores(“_’) and wish to keep “MyFirstName_SecondName”. The part to keep may not have any underscore(e.g. MyFirstName only)
I have spent lot of time but I am not able to write customized function which can substring the string as per my requirement.
Regards,
Sachin
Try this:
Hello Morten,
Actually I do not wish to use the functionnality provided by <span style="color: #008800;">umbraco library. So how can Iit in that case.</span>
Why not? Is it not for an umbraco solution?
Hello Morten,
I get following Error while using it. :
Error in XPath Expression.
Undefined namspace prefix - 'unbraco.library'.
Sachin, you need to include the umbraco.library namespace in your xslt, e.g. something like this:
>Tommy
is working on a reply...