Hi can anyone make me understand the below expression.
FileName.replace(/^.*[\/]/, ‘’)
Hi can anyone make me understand the below expression.
FileName.replace(/^.*[\/]/, ‘’)
Hey @Pakhi,
This expression will replace the element that is matched by the regex (/^.*[/]/), with an empty string ''
Hey can you explain this regex please if you know
Sure.
. - matches any character except a line break
* - means 0 or more of the preceding token
[ ] - means a character set
\/ - is practically an escaped forward slash character - /