Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

Regular Expressions

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Spacemail by SpaceshipSpacemail by Spaceship
Watch

SiKing

Registered MemberEstablished Member
Impact
6
Hi there.

Just a quick one. I'm looking to get the string 'LS_Y45-80' from:

HTML:
sans-serif>LS_Y45-80<input type=hidden

... and store it in a variable.

Thanks :)
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Call your variable $var.

PHP:
preg_match("/serif>(.*)<input/",$var,$matches);
print_r($matches);

It could obviously be made more precise by expanding it, it could also use [A-Z0-9_-] instead of .*

But... Enjoy :p
 
1
•••
Thanks Dan. Just the sort of thing I needed! (Rep left)
 
0
•••
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back