php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73541 Hyphenated Word Unidentified
Submitted: 2016-11-16 12:01 UTC Modified: 2016-11-16 12:11 UTC
From: amall at actistence dot com Assigned:
Status: Not a bug Package: PCRE related
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: amall at actistence dot com
New email:
PHP Version: OS:

 

 [2016-11-16 12:01 UTC] amall at actistence dot com
Description:
------------
Hyphenated word (https://en.oxforddictionaries.com/definition/in-law) unmatched in word identification.

Test script:
---------------
preg_match("(\w+)", "in-law", $matches);
print_r($matches);


Expected result:
----------------
Array
(
    [0] => in-law
)

Actual result:
--------------
Array
(
    [0] => in
)

Patches

in-law (last revision 2016-11-16 12:02 UTC by amall at actistence dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-16 12:11 UTC] requinix@php.net
-Status: Open +Status: Not a bug -Package: *Regular Expressions +Package: PCRE related
 [2016-11-16 12:11 UTC] requinix@php.net
\w does not match hyphens.

http://www.regular-expressions.info
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 17:01:30 2024 UTC