what it says. this is valid syntax since 5.2.2.

Search for ?P< in core, where you find it replace it with ?' and the matching > with '. I think there are four. Leave Symfony alone. That's all.

Proove: (http://ca2.php.net/manual/en/regexp.reference.subpatterns.php)

It is possible to name a subpattern using the syntax (?Ppattern). This subpattern will then be indexed in the matches array by its normal numeric position and also by name. PHP 5.2.2 introduced two alternative syntaxes (?pattern) and (?'name'pattern).

CommentFileSizeAuthor
#6 1890536-6.patch2.49 KBjibran
#6 interdiff.txt1.1 KBjibran
#2 1890536.patch2.38 KBchx
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Issue tags: +Novice

Now, this is a novice task if I ever saw one.

chx’s picture

Issue summary: View changes

Updated issue summary.

chx’s picture

Title: Update core pregs to use ?'name' for subpatterns instead of ?P<> » Update core pregs to use ?<name> for subpatterns instead of ?P<>
Status: Active » Needs review
Issue tags: -Novice
FileSize
2.38 KB

Eh, the quote is a bad idea because the strings are in quotes so let's use the ?<> syntax instead. Less nice but still good. Also makes the change easily scriptable.

Status: Needs review » Needs work

The last submitted patch, 1890536.patch, failed testing.

jibran’s picture

Status: Needs work » Needs review

#2: 1890536.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 1890536.patch, failed testing.

jibran’s picture

Status: Needs work » Needs review
FileSize
1.1 KB
2.49 KB

Reroll.

jibran’s picture

Issue summary: View changes

Updated issue summary.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Changes look fine and the issue summary links to the docu of PHP.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 92a674e and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

added quote