Using C#, I need to prepare a search text for searching in a SQL Server database using the LIKE command by replacing all whitespace outside quotes with a % character. Example:
Input:
my "search text"
Output:
%my%search text%
Any help would be appreciated. I can handle input strings with an odd number of quotes before replacing the text.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…