Unstoppable Domains โ€” Expired Auctions

Regex - I hate it

NamecheapNamecheap
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

iNod

Eating PieVIP Member
Impact
66
Hello,

I'm trying to do the following

I have a list (BIG) of things like

<option value="434">Intel Pentium EE 965 Presler, 3733/266, I975X, DDR2-667</option>

I want to take this list and remove the
value="434" part.. So it is just like

<option>Intel Pentium EE 965 Presler, 3733/266, I975X, DDR2-667</option>

I want to do this using preg_match or another regex php function.. It will always be 3 digits (NNN) and nothing else.


PS. Numbers are not all 434.. They are a variety of numbers.

- Steve
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
PHP:
echo preg_replace('#<option(.*?)>#', '<option>', $list);
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Truehost โ€” .com domains from $4.99, hosting includedTruehost โ€” .com domains from $4.99, hosting included
Escrow.com
Spaceship
Domain Recover
CryptoExchange.com
Catchy
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back