Sublime Forum

Sublime Text 3 can't find "<![CDATA

#1

Hi.
I’m using Sublime Text 3 on OSX 10.15.4. Tried to replace the following string: “<![CDATA[”
Unfortunately Sublime Text didn’t find the string in the xml file.
The highlighter works until here: “<!”. If I set the first opening square bracket highlighting stops.

Best bolshi

0 Likes

#2

Hi bolshi.

CDATA is a special XML syntax for escaping string data. Read more here. Sublime Text’s default XML highlighter will always highlight everything inside the CDATA tag as it would a string.

bild

I’m not sure what your problem is. Do you want to replace all CDATA tags in your XML file using something like the Find-and-Replace tool (CtrlOrCmd+H) ?

0 Likes

#3

you could disable regex search mode in the find options (the toggle button to the far left of the find input) or escape your square brackets to make it a valid regex - <!\[CDATA\[

2 Likes

#4

You saved my day:)

thx a lot!

0 Likes