match and capture all attributes of a font tag
Posted: Thu Jul 07, 2005 4:37 am
I've written the following regex to capture a font tag and its attribute and value:
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys![\"]\s*>!i';
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!its attribute and value:
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the t\=\s*[\"]([^\"]+)[\"e;]\s*>!i';
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd d its attribute and value:
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!dify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!eral. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!)\s*([a-z]+)\s*\=\s*[\"]([^\"]+)[\"]\s*>!i';
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2;a-z]+)\s*\=\s*[\"]([^\"]+)[\"]\s*>!i';
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but iollowing regex to capture a font tag and its attribute and value:
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats f capture a font tag and its attribute and value:
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one 80a]
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one at\s*>!i';
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!nd value:
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!m fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I mod$regex = '!<(font)\s*([a-z]+)\s*\=\s*[\"]([^\"]+)[\"]\s*>!i';
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!
Code: Select all
$regex = '!<(font)\s*([a-z]+)\s*\=\s*[\"]([^\"]+)[\"]\s*>!i';However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys![\"]\s*>!i';
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!its attribute and value:
Code: Select all
$regex = '!<(font)\s*([a-z]+)\s*\=\s*[\"]([^\"]+)[\"]\s*>!i';However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the t\=\s*[\"]([^\"]+)[\"e;]\s*>!i';
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd d its attribute and value:
Code: Select all
$regex = '!<(font)\s*([a-z]+)\s*\=\s*[\"]([^\"]+)[\"]\s*>!i';However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!dify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!eral. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!)\s*([a-z]+)\s*\=\s*[\"]([^\"]+)[\"]\s*>!i';
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2;a-z]+)\s*\=\s*[\"]([^\"]+)[\"]\s*>!i';
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but iollowing regex to capture a font tag and its attribute and value:
Code: Select all
$regex = '!<(font)\s*([a-z]+)\s*\=\s*[\"]([^\"]+)[\"]\s*>!i';However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats f capture a font tag and its attribute and value:
Code: Select all
$regex = '!<(font)\s*([a-z]+)\s*\=\s*[\"]([^\"]+)[\"]\s*>!i';However it only matches font tags with only one 80a]
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one at\s*>!i';
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!nd value:
Code: Select all
$regex = '!<(font)\s*([a-z]+)\s*\=\s*[\"]([^\"]+)[\"]\s*>!i';However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!m fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I mod$regex = '!<(font)\s*([a-z]+)\s*\=\s*[\"]([^\"]+)[\"]\s*>!i';
I'm fairly pleased with that given that I wrote it from scratch and am beginning to get the hang of these horrible things. It might not be the most efficient but it works.
However it only matches font tags with only one attribute and there could be several. How can I modify it so that the 2nd bit repeats for as many attributes as there are in the tag?
Thanks to everyone who has helped me on regex in the past - I learned a lot from you guys!