Bug #73541 [Opn->Nab]: Hyphenated Word Unidentified

From: Date: Wed, 16 Nov 2016 12:11:25 +0000
Subject: Bug #73541 [Opn->Nab]: Hyphenated Word Unidentified
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-205406@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73541&edit=1 ID: 73541 Updated by: requinix@php.net Reported by: amall at actistence dot com Summary: Hyphenated Word Unidentified -Status: Open +Status: Not a bug Type: Bug -Package: *Regular Expressions +Package: PCRE related Operating System: Linux PHP Version: Irrelevant Block user comment: N Private report: N New Comment: \w does not match hyphens. http://www.regular-expressions.info Previous Comments: ------------------------------------------------------------------------ [2016-11-16 12:01:30] 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 ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73541&edit=1

« previous php.bugs (#205406) next »