'StringRegExp pattern | Get the end of the path

I have a path of picture like

$path = "C:\Users\nvquang\Desktop\New folder\AutoIT_ImageSearchUDF\GUI ImageSearch\Close.bmp"

I want to get only Close.bmp
The function which i am trying to write looks like :

$fileName = StringRegExp($sFileOpenDialog,"GUI ImageSearch\(.*?).bmp",1)

But value of fileName is 0
So now - what is wron with this function? I am not good at RegExp patterns but i am sure that is the best method to do what I want.



Solution 1:[1]

I am not good at RegExp patterns but i am sure that is the best method to do what I want.

As per Documentation - Function Reference - StringTrimLeft :

Trims a number of characters from the left hand side of a string.

Example:

$sFilename = StringTrimLeft($sPath, StringInStr($sPath, '\', 0, -1))

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user4157124