473,327 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Regex help: processing parameters

Suppose a string of the following format:

/field=value string /field2=value string2 /field3=value string3

where

field is [a-z], [0-9], and _

value string is any alphanumeric text that doesn't include =, but may include /

What is the regex expression that will split this into field & value?

Thanks
Nov 16 '05 #1
1 1317
I know this doesn't answer your question directly, but you may be able to use
the InstallContext.Parameters property instead of Regex to split the
parameters into name/value pairs.

using System.Configuration.Install;
using System.Collections.Specialized;

class MyClass
{
public static void Main(string[] args)
{
InstallContext context = new InstallContext(null, args);
StringDictionary parameters = context.Parameters;

string value1 = parameters["field1"];
string value2 = parameters["field2"];
string value3 = parameters["field3"];
...
}
}
"Julie" wrote:
Suppose a string of the following format:

/field=value string /field2=value string2 /field3=value string3

where

field is [a-z], [0-9], and _

value string is any alphanumeric text that doesn't include =, but may include /

What is the regex expression that will split this into field & value?

Thanks

Nov 16 '05 #2

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

Similar topics

4
by: Chuck Haeberle | last post by:
I have an interesting regular expression challenge for someone more experienced with them than I for a data layer class... I need an expression to search a SQL statement (any type, SELECT INSERT...
2
by: tshad | last post by:
I am trying to get a regular expression to work and I keep getting the following error: Compiler Error Message: BC30469: Reference to a non-shared member requires an object reference. The...
1
by: Leon | last post by:
Please help, what I'm I doing wrong????? --> This following code will not run correctly, no syntax errors, but.. --> execution error = The subdomain does not exist in database.... "but it does in...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
7
by: Siv | last post by:
Hi, I have a stored procedure that I want to execute and then wait in a loop showing a timer whilst it completes and then carry on once I get notification that it has completed. The main reason...
4
by: MooMaster | last post by:
I'm trying to develop a little script that does some string manipulation. I have some few hundred strings that currently look like this: cond(a,b,c) and I want them to look like this: ...
1
by: oshaer | last post by:
Shalom. I need to go over a file, and check for each line if it matches a Regex from a list of expressions. (If it matches ANY of the expressions, this is good enough). I have put the Regex's...
15
by: Jay | last post by:
I have a multi threaded VB.NET application (4 threads) that I use to send text messages to many, many employees via system.timer at a 5 second interval. Basically, I look in a SQL table (queue) to...
3
by: Razvan | last post by:
Hello there, I have the following problem: I have a big html and i want to remove from it everything between some tags and to keep the rest, of course using regex, but any solution will be...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.