Eden G
Eden G

Reputation: 60

Intellij regular expression search in XML atributes

I'm using Intellij and I want to search for XML attributes.

For example this XML line:

<img src="madonna.jpg" alt='Foligno Madonna, by Raphael' />

I want to search my project for any other instances of this line:

<img src="BLABLALBA" alt='BLABLALBA' />

I tried using this regular expression : src="\W" but no results was found.

Any help appriciated.

Upvotes: 0

Views: 318

Answers (1)

Bas Leijdekkers
Bas Leijdekkers

Reputation: 26482

Try Structural Search & Replace (Edit | Find | Search Structurally...). Use the following pattern:

<img src="$A$" alt="$B$" />

And set the file type to XML or HTML depending on what type of files you are searching.

Upvotes: 1

Related Questions