1

was wondering if anyone could help me find the regular expression for this problem. I'd like to replace the following using Visual Studio 2010's built in Find/Replace function:

_batch.AddInstruction(InstructionType.Update, "LEG_RES_ID", "N")

with

_batch.AddInstruction(InstructionType.Update, BpcFields.LegResId, "N")

The "LEG_RES_ID" is a placeholder, multiple different strings can occur here. For any string in that position, the equivalent member of BpcFields will be a Pascal-case version of the same string, without the underscores, as in the example above.

Many thanks in advance!

Joris Timmermans
  • 10,814
  • 2
  • 49
  • 75
Aetherix
  • 2,150
  • 3
  • 24
  • 44

1 Answers1

0

I'd look at this answer and try to use macros. It seems that it is not possible to changhe the case of text only with regexp unless you have another editor (for example EditPad pro according to this question).

Another workaround would be to create a program that performs the task you need on text files and use it on your source.

Community
  • 1
  • 1
Gabber
  • 5,152
  • 6
  • 35
  • 49