Assuming you're free to use LuaLaTeX, and assuming further that the material between \{
and \}
(including the delimiters) is all on one line, the following solution should work just fine for you.
The solution consists of a Lua function (stored in an external file) and two LaTeX macros; the first assigns the Lua function to the process_input_buffer
callback, making it act like a preprocessor, and the second removes the preprocessor-like operation of the Lua function.

The pattern-matching operation, "\\{.-\\}"
, uses .-
rather than -*
to match "zero or more instances of any character". Observe that using -*
would be a mistake here, as it would make Lua perform a "greedy" match and thus inappropriately obliterate the middle substring, uvw
.
\RequirePackage{filecontents}
%% External file with "\{ ... \}" material
\begin{filecontents*}{cxf.tex}
$abc \{...\} uvw \{ \int_0^1 \} xyz$
abc\{ ... \}uvw\{ \int_0^1 \}xyz
\end{filecontents*}
% Place the Lua code in a separate external file
\begin{filecontents*}{external.lua}
function remove_braced_stuff ( s )
return ( s:gsub ( "\\{.-\\}" , "" ) )
end
\end{filecontents*}
\documentclass{article}
%% Load the Lua function from the external file
\directlua{dofile("external.lua")}
%% Two utility LaTeX macros
\newcommand{\RemoveBracedStuff}{\directlua{
luatexbase.add_to_callback ( "process_input_buffer" ,
remove_braced_stuff , "removestuff" )}}
\newcommand{\DontRemoveBracedStuff}{\directlua{
luatexbase.remove_from_callback ( "process_input_buffer" ,
"removestuff" )}}
\begin{document}
\RemoveBracedStuff % Enable the Lua function
\input cxf % Load the external file
\DontRemoveBracedStuff % Disable the Lua function
%% remainder of document
\end{document}