Reputation: 956
I have this string in an xml file :
<wp:meta_value><![CDATA[1 600 € ]]></wp:meta_value>
and I'd like it to be :
<wp:meta_value><![CDATA[1600 €]]></wp:meta_value>
I'm trying to do this within the find tool of sublime text 2, so far I have for find :
<wp:meta_value>(.*?)</wp:meta_value>
and for replace :
<wp:meta_value>$1</wp:meta_value>
Any help appreciated !
Upvotes: 0
Views: 3409
Reputation: 985
Press Ctrl + H
to open find and replace option.
Find What: \s+
Replace With: \s
\s
looks for spaces. +
looks for repetitions of \s
. Replacing it with \s
replaces consecutive spaces with a single one.
This works in Sublime v3.
Upvotes: 0
Reputation: 4014
Search for \s\+]
and replace with ]
I'm not familiar with sublime. If the above doesn't work it's possible that you need to escape the ]
in the search string as \]
.
Upvotes: 0
Reputation: 30283
You might want to look over a tutorial for regular expressions. You want to find
_+
where _
is a space, and replace it with
_
Upvotes: 1