I have a Visual Studio project, which is developed locally. Code files have to be deployed to a remote server. The only problem are the URLs they contain, which are hard-cod
this line should work for your 3 examples:
sed -r 's#\?(page)=([^&]*)/\1/\2#g' a.txt
-r to save some escaping .test with your example (a.txt):
kent$ echo "?page=one&
?page=two&
?page=three&"|sed -r 's#\?(page)=([^&]*)/\1/\2#g'
/page/one
/page/two
/page/three