I am just trying out Advanced find and replace and it looks great.
Unfortunately I am a total newbie with regular or normal expressions and am going nuts about trying to replace some spaces into +. Sometimes it can be that there is no space if there is only on keyword within the value.
Hope someone can help me
I have following line in various html files:
<!--#set var="keyword" value="keyword1 keyword2 keyword3" -->
the keyword1 etc is allways a different word. It can be only one keyword or up to 6 keywords i.e. keyword1 keyword2 keyword3 keyword4 etc.
What I need to do is to keep the words the same whatever they are but replce the spaces inside the value variable into a +
The result should be like
<!--#set var="keyword" value="keyword1+keyword2+keyword3" -->
so one result example could be:
<!--#set var="keyword" value="hello+world+me" -->
an other
<!--#set var="keyword" value="hello" -->
or
<!--#set var="keyword" value="hello+today+is+my+birthday" -->
Hope I was able to explain in enough detail.
Any help is very appreciated.
Thanks
Trav
Need help with a find and replace expression - tks -
Hi,
There can be a plenty different variants.
For example one of them:
Go to Batch replace, enable "Use regular expressions".
Put into search for:
"keyword"(\s*)value="(\S*) (.*)"
Replace with:
"keyword"$1value="$2+$3"
Then press Execute button 5 times (as far as you have up to 6
keywords).
I verified it works fine.
There can be a plenty different variants.
For example one of them:
Go to Batch replace, enable "Use regular expressions".
Put into search for:
"keyword"(\s*)value="(\S*) (.*)"
Replace with:
"keyword"$1value="$2+$3"
Then press Execute button 5 times (as far as you have up to 6
keywords).
I verified it works fine.