[英]Extract file name from a url - jmeter regular expression extractor
I am trying to extract the file name with jmeter regular expression extractor. 我正在尝试使用jmeter正则表达式提取器提取文件名。 my parsed url will be /xxxx/systems/fileName.ext , the file name and the extension will be dynamic.
我解析的网址将是/xxxx/systems/fileName.ext,文件名和扩展名将是动态的。 so I can't use any static name in the parser.
所以我不能在解析器中使用任何静态名称。 All I know is the third / .
我只知道第三个。 I tried with multiple combinations .
我尝试了多种组合。 but no luck.
但没有运气。 Any help appreciated.
任何帮助表示赞赏。
This will give you everything at the end of the string that isn't a forward slash: 这将为您提供字符串末尾不是正斜杠的所有内容:
[^/]+$
Broken down: 细分:
[^/]
- Match a character that isn't a forward slash [^/]
-匹配不是正斜杠的字符
+
- Match one or more (as many as possible) +
-匹配一个或多个(尽可能多)
$
- Match at the end of the string $
-在字符串末尾匹配
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.