Regex with Variable input

Hi all,

I have a Regex expression that I’m using to replace a value in a string. The expression looks like this “((\W)(arc)” and it works fine. However I want to have a variable value for the regex input is there a way I can do that?

Format string? No. Its been requested.

Try this, or similar:

“(\W)(” + arc + “)”

I think this might be the first question I’ve asked that the answer was no!!

Unfortunately the problem I have is I don’t know the value - it will vary from file to file. Hopefully it will get added soon - would be quite useful…

Keith,

I don’t think Thomas said no, he said it can be done like this:

An example of how you want things to vary would help us understand your question better.

2 Likes

Sorry, I misunderstood, I assumed he was suggesting having a list of inputs that would be search for - I see what you mean now, and yes that will do what I need. Many thanks.

1 Like