1

How do you replace using regex?

For example. the String is D + WIDTH / 2

If I try to replace D into 1 the output is 1 + WI1TH / /2.

How do you replace the D only, and exclude the D of WIDTH?

0

1 Answer 1

2
\bD\b

Should do it for you. \b is for word boundary

Sign up to request clarification or add additional context in comments.

1 Comment

Title says VB6. Tag says VB6. No edits to either. Answer is VB.NET. Accepted. Lol.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.