My HTML code is:
<a class="view-details-ul-none" href="javascript:printCertificate('11673191')">
I try this expression: href="javascript:printCertificate(\\)|\\(.*?)">
it return me the ID but along id number it return brackets and comma too, like below image:
When I pass this regular expression to next request as parameter my url become wrong and http send 500 http error code. because url looks like this:
GET https://Domain/path/completionCertificate.pdf?Id=('11673191')
Could anyone please help me in this would be appreciated.
Go for the following regular expression:
<a class="view-details-ul-none" href="javascript:printCertificate\('(\d+)'\)">
Demo:
Remember to escape the following characters outside character classes:
.^$*+?()[{\|
and these inside the character classes:
^-]\
References:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.