Jump to content

[SOLVED] URL regex help


doug007

Recommended Posts

Square brackets delineate character classes: a pool of characters from which only one is picked. [1-9_1-9] is equivalent to [1-9_], which will only match 1, 2, 3, 4, 5, 6, 7, 8, 9, or _. You want something along the lines of /\d+_\d+\z/, which requires preg_match. The ereg would be [0-9]+_[0-9]+$.

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.