By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,279 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

A bit stumped in Regex Syntax

P: n/a

hello!

I'm trying to use the POSIX regex syntax in PHP, and having a bit of
trouble with word boundary separators.

The basic syntax i have seen in the various tutorials i have read over the
last bit all suggest some variation on \< and \> or :<: and :>:, etc. i
have even seen code that uses:

[[:<:]][:alnum:][[:>:]] to match a word containing alphanumeric
characters.

however, i cannot seem to get this to work at all. every time i enter:

:<: in a regex, it does not match. if i enter [[:<:]], i get an error
stating that there is an "mbregex compile err: invalid POSIX bracket type"
in my file ...

any ideas what's going on?

thanks.

[please do not suggest that i use the preg_ functions instead ... i need a
multibyte character set (utf-8) compatible regular expression engine.]

mark.

--
I am not an ANGRY man. Remove the rage from my email to reply.
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Mark wrote:
if i enter [[:<:]], i get an error
stating that there is an "mbregex compile err: invalid POSIX bracket type"
in my file ...
So do I.
any ideas what's going on?


http://bugs.php.net/bug.php?id=31576

--
Jock
Jul 17 '05 #2

P: n/a
John Dunlop wrote:
Mark wrote:

any ideas what's going on?


http://bugs.php.net/bug.php?id=31576


D'oh! Should've checked the email address of the person who
submitted that bug report. It was you! We'll see how that
goes.

--
Jock
Jul 17 '05 #3

P: n/a
John Dunlop wrote:
John Dunlop wrote:
Mark wrote:

> any ideas what's going on?


http://bugs.php.net/bug.php?id=31576


D'oh! Should've checked the email address of the person who
submitted that bug report. It was you! We'll see how that
goes.

:-). i was feeling kinda stupid as i was working through the problem, but
then tried it on my production (non-Windows :-)) machines and discovered
that it worked teh awes0me!11!1!

looks like it's only a problem on Winders WITH mbstring.dll enabled ...
*sigh*. That might be the first time i've ever seen Windows be the lousier
platform for intl support ... !!!

thanks,
mark.
--
I am not an ANGRY man. Remove the rage from my email to reply.
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.