Search not working as expected

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
sparklyfirefly
Propeller Head
Posts: 20
Joined: Thu Apr 14, 2016 1:42 am

Search not working as expected

Post by sparklyfirefly »

Hi all,

I need to search and replace a large number of errors I've found in my project, but the basic search is not working as expected.

I have used a class, followed immediately by a variable throughout the project.

For example, <span class="ProductApplication">xxxxxxxx</span> <MadCap:variable name="Custom.Application" />
In this example, there is a space between the </span> and the <MadCap:variable name...> - which is correct.

However, I must have done a search and replace at some point, and I have hundreds of the following:
<span class="ProductApplication">xxxxxxxx</span><MadCap:variable name="Custom.Application" /> - with no space.

When I search for
<MadCap:variable name="Custom.Application" />, it finds 548 instances.

However, when I search for
</span><MadCap:variable name="Custom.Application" />, it finds none at all.

As a test, I tried searching for
><MadCap:variable name="Custom.Application" /> and again, none are found, so it seems it is something to do with the elements.

Could someone please advise how to search successfully for the span at the end of the class, and the variable? I can't search for the whole of the span class as there are many different product application names. I realise I may need to use the Find Elements dialog but I am unsure how to use it.

Thanks
Laura
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Search not working as expected

Post by NorthEast »

If I copy and paste that full code into a topic, I can find it ok - </span><MadCap:variable name="Custom.Application" />

Assuming the search options are set correctly, then could there be a character between the </span> and <MadCap tags that the editor isn't displaying?
To test this:
* You could manually delete the whole </span><MadCap bit in one topic and then retype it, then see if that instance shows up in a search.
* You could check the file in something like Notepad++, as that can show extra control characters (use View > Show Symbol > Show all characters).
* Try the same search in an external text editor like Notepad++, Notepad, VS Code - or whatever you normally use.

The Find Elements search probably isn't that useful in this case, as it only finds/replaces a single element.
sparklyfirefly
Propeller Head
Posts: 20
Joined: Thu Apr 14, 2016 1:42 am

Re: Search not working as expected

Post by sparklyfirefly »

Thanks for taking the time to reply, NorthEast. I'll give some of your suggestions a go.
Laura
Post Reply