[wp-trac] [WordPress Trac] #32878: More readable regular expressions for Press This URL's
WordPress Trac
noreply at wordpress.org
Wed Jul 15 18:16:07 UTC 2015
#32878: More readable regular expressions for Press This URL's
--------------------------+------------------------------
Reporter: dd32 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Press This | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------------
Comment (by azaozz):
The patch looks good. We can also make pretty much all groups non-
capturing as they are only used to check if matches exist.
We can probably combine
`/\/([^\.\/]+[-_]{1})?(spinner|loading|spacer|blank)s?([-_]{1}[^\.\/]+)?\.[a-z0-9]{3,4}/`
and `/\/(spinner|loading|spacer|blank|rss)\.(gif|jpg|png)/`, as they are
pretty close (assuming `\.[a-z0-9]{3,4}` is to match image extensions).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32878#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list