Removes matching quotation marks from a character string that begins with a quotation mark, and deletes all characters to the right of the closing quotation mark.
Category: | Character |
Restriction: | I18N Level 2 functions are designed for use with SBCS, DBCS, and MBCS (UTF8). |
data test; input string $60.; result = dequote(string); datalines; No quotation marks, no change No "leading" quotation marks, no change "Matching double quotation marks are removed" 'Matching single quotation marks are removed' "Paired ""quotation marks"" are reduced" 'Paired '' quotation marks '' are reduced' "Single 'quotation marks' inside '' double'' quotation marks are unchanged" 'Double "quotation marks" inside ""single"" quotation marks are unchanged' "No matching quotation mark, no problem Don't remove this apostrophe "Text after the matching quotation mark" is "deleted" ; proc print noobs; title 'Input Strings and Output Results from DEQUOTE'; run;