Jump to content

Beginner at Regex


randomguy1234

Recommended Posts

I'm really clueless about regex.

I've written a pattern:

/<div class=\"search_result_item\" onclick=\"window.location='([^']+)/

My code is something like:

randomcharacters
<div class="search_result_item" onclick="window.location='/summoner/na/19997298'; return false;">

I need that "19997298" out of there, but I get:

<div class="search_result_item" onclick="window.location='/summoner/na/19997298

 

Help me? I'm new to Regex

Link to comment
https://forums.phpfreaks.com/topic/266117-beginner-at-regex/
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.