I would like to replace following test using regex into c#
Input: P C $10000 F + T X (A)
Output: PC $10000 F+TX(A)
Means removing space except dollar amount.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Replace all matches of the following regex with an empty string:
This will match one or more spaces that are not followed by a
$, or preceeded by dollar amount.For this to work your regex engine needs to support variable length lookbehinds. This should not be an issue in C# but this regex may not work on online testing tools or in other languages.