Hi All, I would like to know how can i rewrite/convert a URL containing number is scientific form to normal integer.
For eg: I have something like this coming in the URL http://domain.com/public/domain/app/1.024e+06/1028422/1028422_b24db5c8391ec5c5d93cd0ac083acbdf I would like to have to have the URL having a normal integer so the output should be http://domain.com/public/domain/app/1024000/1028422/1028422_b24db5c8391ec5c5d93cd0ac083acbdf Playing around something like this for testing if (req.http.Host ~ "domain.com") { set req.url = regsub(req.url, "^/public/domain/app/[+|-]?\d\.?\d{0,}[E|e|X|x](10)?[\^\*]?[+|-]?\d+/(.*)/(.*)$", "/public/domain/app/\d+/(.*)/(.*)$"); } Any ideas or any clues if the syntax for the matching scientific nos is correct? Regards, Kevin
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
