Skip to content
Snippets Groups Projects
Commit c78529b0 authored by Xiao Gui's avatar Xiao Gui
Browse files

bugfix: get name pipe

parent 96dda16a
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ import { Pipe, PipeTransform } from "@angular/core";
})
export class GetFilenamePipe implements PipeTransform {
private regex: RegExp = new RegExp('[\\/\\\\]([\\w\\.]*?)$')
private regex: RegExp = new RegExp('\/([^\/]+)$')
public transform(fullname: string): string {
return this.regex.test(fullname)
? this.regex.exec(fullname)[1]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment