PDA

View Full Version : how to remove "\" symbol in url



iswaryasenthilkumar
6th March 2015, 07:34
am having url inside tat url i want to remove special symbols like("\")
i used str.remove("\" ");
its not working..
this was my url
"http:\/\/103.3.229.181\/digital-photo-frame-ads\/public\/uploads\/07032015\/qzms7p5nfcza55539.jpg"
can any one give me suggestion for this to remove "\" symbol :confused:
Thanks in advance:o

wysota
6th March 2015, 07:54
In C++ backslash needs to be escaped by another backslash.

iswaryasenthilkumar
6th March 2015, 09:02
thank you i got answer by using this code
str.remove(QRegExp(QString::fromUtf8("[-`~!@#$%^&*()_—+=|;<>«»,.?{}\'\"\\\[\\\]\\\\]")));

In C++ backslash needs to be escaped by another backslash.

wysota
6th March 2015, 09:53
I don't think removing that much is a good idea.

iswaryasenthilkumar
6th March 2015, 12:42
i got perfect url while using above code
"http://103.3.229.181/digital-photo-frame-ads/public/uploads/07032015/qzms7p5nfcza55539.jpg"
"http://103.3.229.181/digital-photo-frame-ads/public/uploads/07032015/srtsxvvopmu796070.png"
"http://103.3.229.181/digital-photo-frame-ads/public/uploads/07032015/qlk7ajrnkh8z82910.png"
i have doubt on this..using this link i want to download images can you give me suggestion for this???
Thanks in Advance

wysota
6th March 2015, 13:10
i got perfect url while using above code
Great, what if the url is of the form: "http://my-example.com/~username/some_document%20with%20spaces?image_path=img@1&fmt=png"?

iswaryasenthilkumar
6th March 2015, 13:41
sorry wysota i dont have that much knowledeg to rectify what you asked:(

Great, what if the url is of the form: "http://my-example.com/~username/some_document%20with%20spaces?image_path=img@1&fmt=png"?

wysota
6th March 2015, 13:55
You don't have to rectify anything. Just use a JSON parser to parse your image list.