Regular Expression To Select An Entire Line That Contains a HTML Class

16,101

I'm not a regex expert, but I would think that ^.*class=navigation.*$ would work.

Share:
16,101
Nathan Campos
Author by

Nathan Campos

Electrical Engineer, Ham radio operator, photographer, used to be a programmer.

Updated on June 04, 2022

Comments

  • Nathan Campos
    Nathan Campos almost 2 years

    I'm using TextMate to edit a project that I'm doing(HTML files) and I have some <div> tags assigned with the class=navigation property, but I need to change this <div>'s for a new design that I'm planning, but they are much(about 47 results if I search for class=navigation).

    So I need a regular expression to match the entire line that this property is found, but which is it?

  • Bikash Gyawali
    Bikash Gyawali almost 11 years
    But . should be greedy and even match the class=navigation string, no?