473,471 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

hmm, reg exp prob again

Hello

why doesn't this match everything after first space?

Match m = Regex.Match(@"/great ba b4",@"Zs:+");

/Lasse


Nov 15 '05 #1
1 1123
"Lasse Edsvik" <la***@nospam.com> wrote in
news:Oa**************@TK2MSFTNGP10.phx.gbl:
Hello

why doesn't this match everything after first space?

Match m = Regex.Match(@"/great ba b4",@"Zs:+");


Lasse,

"Zs" is not a valid regular expression to match a space. To match a
Unicode space, the correct regex is \p{Zs}.
Match m = Regex.Match(@"/great ba b4", @"\p{Zs}(?<match>.*)");

// Use the named-capture group to get the result (ba b4).
Console.WriteLine(m.Groups["match"].ToString());
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Robot Tree | last post by:
Anyone know how to do this? I have 25 *.gif files, all of the same dimensions. I want to display one at a time in the top middle of a dynamic web page, with 25 links below the display that...
5
by: Steve | last post by:
Hi, I have a private website for 20 people that is similar to a web email client like hotmail. There are two frames, one on the left with links for "New", "History", "Todays" and a frame on the...
5
by: howdy | last post by:
Hi all, I'm trying to rotate 5 images which load from the server. My script loads the images but when i move to the end of my array i want to cycle throught the array again so that the images will...
28
by: Vishal Naidu | last post by:
i m new to the C world... i ve been told by my instructors not to use goto stmt.. but no one could give me a satisfactory answer as to why it is so.. plz help me out of this dilemma, coz i use...
2
by: Commander Ace | last post by:
Hi, I'm having some problems with updating an SQL Database with modified fields from a datatable. I got the code from a Wrox book, 'Professional VB.NET 2003', the same code can be found here:...
2
by: dileep | last post by:
I am new to Ajax and i found some good tutorials from the net.but when i downloaded the basic sample examples and try to execute i get the error "specified file not found", even though the files...
6
by: JyotiC | last post by:
hi, i am making a GUI using Tkinter, I have a button and a checkbutton. i want the button to be enable when checkbutton is on and disble when the checkbutton is off. thanx
0
Savage
by: Savage | last post by:
I'm making for fun a simple program which format a input file.Input file sustain of person name,lastname and date of birth.Output file si supposed to be forammted as following: NAME ...
2
by: mnacw | last post by:
Can anybody help me to resolve this prob. i have installed Visual Studio 2005 Professional edition. I am working in VB.Net. When I tried to connect to database it is connected but when i make some...
1
by: Daniel Loose | last post by:
Hello again, and thanx again - I now found something unexpected - that hopefully is the cause of my problem? : In Man. studio security anmeldungen (engl. login names or users or accounts or...
0
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...
1
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...
0
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...
1
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
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.