Hi,
This is my first post. Please forgive user-ignorance if this is the issue.
Im a low-rent perl programmer, trying out and really enjoying C# express beta.
Ive always managed to get a little turned around with complicated regexen. Luckily perls regex is (unsafely) powerful and you can avoid having to write a "proper" regex with it usually.
Im 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, Id do a replacement match, something like s/(!~(?:\$\S+)|(?:\s+))//g;
-- but I cant 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.
Im a low-rent perl programmer, trying out and really enjoying C# express beta.
Ive always managed to get a little turned around with complicated regexen. Luckily perls regex is (unsafely) powerful and you can avoid having to write a "proper" regex with it usually.
Im 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, Id do a replacement match, something like s/(!~(?:\$\S+)|(?:\s+))//g;
-- but I cant 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.