문제

I need to extract file name of an image from one html string using Idoc Script regex functions.

Input string:

"<img src="/cs/content./file_name.png" alt="" />"

Output need to be:

"file_name"

Can you help me?

도움이 되었습니까?

해결책

Try this one. The first capturing group should contain the result:

<img\s+src\s*=\s*"[^"]*\/([^"]*)\.[^"]*"[^\/]*\/>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top