Hi,
This is my first post. Please forgive user-ignorance if this is the issue.
I'm a low-rent perl programmer, trying out and really enjoying C# express beta.
I've always managed to get a little turned around with complicated regexen. Luckily perl's regex is (unsafely) powerful and you can avoid having to write a "proper" regex with it usually.
I'm trying to create a regex to strip everything but dollar ammounts and white space from a file. I have some values like "$1,200-$3,500", but in no other case is there text I want to strip immediately following a dollar sign. Some lines have mulitple dollar ammounts at different places on the line, however (up to four I think).
In perl, I'd do a replacement match, something like s/(!~(?:\$\S+)|(?:\s+))//g;
-- but I can't do this in C#.
Can anyone help me write the proper replacement regex? Since I have to run this through hundreds of thousands of lines in a catalog we produce, I need it to be somewhat effecient.
This is my first post. Please forgive user-ignorance if this is the issue.
I'm a low-rent perl programmer, trying out and really enjoying C# express beta.
I've always managed to get a little turned around with complicated regexen. Luckily perl's regex is (unsafely) powerful and you can avoid having to write a "proper" regex with it usually.
I'm trying to create a regex to strip everything but dollar ammounts and white space from a file. I have some values like "$1,200-$3,500", but in no other case is there text I want to strip immediately following a dollar sign. Some lines have mulitple dollar ammounts at different places on the line, however (up to four I think).
In perl, I'd do a replacement match, something like s/(!~(?:\$\S+)|(?:\s+))//g;
-- but I can't do this in C#.
Can anyone help me write the proper replacement regex? Since I have to run this through hundreds of thousands of lines in a catalog we produce, I need it to be somewhat effecient.