-1

I have question related to the following post Regex for splitting a string using space when not surrounded by single or double quotes Is there a way to split string when parenthesis is also involed

Input String -("This is My First String") Second Third Should split to ("This is My First String") Second Third

Input String - "This is My First String" Second Third should split to

"This is My First String" Second Third

Cœur
  • 37,241
  • 25
  • 195
  • 267
TAugusti
  • 71
  • 8

1 Answers1

1

You can escape parentheses in Regex using backslash.

Regex \(a\) will match exactly string (a).

You can find more about special characters here: https://www.regular-expressions.info/refcharacters.html

Or try out your regex with explanation here: https://regex101.com/

Adrian Farmadin
  • 407
  • 2
  • 11