Jump to content

Arbitrary order


Mastodont

Recommended Posts

How can I specify arbitrary order of two character groups? Suppose that I want capture some parts of hyperlink ("a" tag) and don't know the order of two specific attributes, title and class:

 

<a href="..." class="..." title="..." ... >...</a>
<a href="..." title="..." class="..." ... >...</a>

 

The space between "class" and "title" could be filled with other attributes, but I don't care about them ...

 

Is it possible with one regex? Thanks for advice.

Link to comment
https://forums.phpfreaks.com/topic/69088-arbitrary-order/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.