473,816 Members | 2,906 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A bit stumped in Regex Syntax


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
3 1510
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2573
by: zOrg | last post by:
hi, i'm using the preg_match_all() function to parse an asp file and find all include file within this file : asp include strings can be : <!--#include virtual="/dir/file.asp"--> or <!--#include file="/dir/file.asp"-->
75
4674
by: Xah Lee | last post by:
http://python.org/doc/2.4.1/lib/module-re.html http://python.org/doc/2.4.1/lib/node114.html --------- QUOTE The module defines several functions, constants, and an exception. Some of the functions are simplified versions of the full featured methods for compiled regular expressions. Most non-trivial applications always use the compiled form UNQUOTE
8
2992
by: Johnny | last post by:
I need to determine whether a text box contains a value that does not convert to a decimal. If the value does not convert to a decimal, I want to throw a MessageBox to have the user correct the value in the text box. I have the following code but when the user enters a decimal value the Regex.IsMatch catches it (ex. 250.50 should be allowed, but 250.50.0 should not). My code is as follows: if( ! Regex.IsMatch( tboxQtyCounted.Text,...
3
1734
by: Stephan Bour | last post by:
I have a string ³Name² in the following format: ³LastName, FirstName (Department)² that comes from Active Directory. I need to extract the FirstName from the string. Substrings are not practical for this so I used a Regex that splits the string at the first ³, ³ and again at the ³ (³. My problem is that I don¹t know how to extract the second member of the resulting array (FirstName) and assign it to another string. Using StringBuilder, as...
17
3984
by: clintonG | last post by:
I'm using an .aspx tool I found at but as nice as the interface is I think I need to consider using others. Some can generate C# I understand. Your preferences please... <%= Clinton Gallagher http://forta.com/books/0672325667/
3
2121
by: jg | last post by:
I made a mistake somewhere in my vb code and I look, check and read against the articles and help on regex, I still can't find the mistake I made. I know my test string and the test patterns works, because I used on a vs. script to check. I also believe I foolwed followed the regex syntax for dotnet. here is the source code for the function and testing Public Function regtest(ByVal StringIn As String, ByVal patrn As
3
5274
by: gisleyt | last post by:
I'm trying to compile a perfectly valid regex, but get the error message: r = re.compile(r'(*)(\d{1,3}\.\d{0,2})?(\d*)(\,\d{1,3}\.\d{0,2})?(\d*)?.*') Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/sre.py", line 179, in compile return _compile(pattern, flags) File "/usr/lib/python2.3/sre.py", line 230, in _compile
8
2246
by: Xah Lee | last post by:
the Python regex documentation is available at: http://xahlee.org/perl-python/python_re-write/lib/module-re.html Note that, i've just made the terms of use clear. Also, can anyone answer what is the precise terms of license of the official python documentation? The official python.org doc site is not clear. Note also, that the regex syntax used by Perl is the same as Python.
2
2629
by: rockstar_ | last post by:
Hello all- I'm developing a Content Management software for my own site, and possibly package and deploy to other sites (for friends, family, etc.) The content management software is combined blog, photo, and site management tools. One the of the tools I would find INREDIBLY helpful is the ability to block out and syntax highlight code. I would like to be able to, as I'm writing a blog post about something I've done in Python (for...
0
9738
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10674
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10409
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10433
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10149
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7689
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6900
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4361
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3889
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.