Regex help

P

Papanii Okai

Hi Guys,
I am a newbie at C# and i am trying to use the Regex class. I
currently have a string with some text and i want to replace part of the
string which has a particular pattern. I have created a group name for the
pattern but i don't know how to indicate what the new pattern is. I want to
use the group name technique.
Here is the code i have at present..

string scriptline = "00:00:00.045 URL
http://thewjhrj/fhsfsjfksjfjslf/sfjsf/fflkfs/.htm&&eframe";

Regex rx = new Regex((@"?<time>^\d\d:\d\d:\d\d.\d\d\d"));

I want to change the format form \d\d:\d\d:\d\d.\d\d\d to \d\d:\d\d:d\d\.\d.
which menas 00:00:00.045 becomes 00:00:00.0Can anyone lead me to the right
direction.

Thanx..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Regex in C# 4
Regex help 1
Regex with time 3
RegEx Format Help 4
regex multiplication problem 3
Regex pattern problem 2
regex help 1
Rookie thoughts on Regex--useful but not complete 28

Top