Ok so with some research and studying I found the answer. In order to achieve this you have to search for <span class="price" id="[^"]*["]">
and replace with <price>
. To take this even further you could search with this>
class="[^"]*["]|id="[^"]*["]|style="[^"]*["]
Let’s break down this regular expression down piece by piece. I suggest using the table of rules provided by Adobe as reference.
sid=” – the s represent any type of space (tab, space, form/line feed). Checking for a space is important for some tags as it ensures that you are not picking up fragments of other attributes. For instance, align=” would pick up both align and valign tag attributes.
[^"]* – this matches any character except the double quote (“) character and continues to until it finds a double quote. This is because the [^"] rule is proceeded by a asterisk (*). ” – picks up the closing double quote to complete the regex.
|sclass=”[^"]”| sstyle=”[^"]”- the vertical line character (|) signifies an either/or rule. Therefore, it will find all id, class and style tags that begin and end with double quotes.