Actually I am using java.util.regex.* But you did point out a couple
mistakes in my expression. Below is the function that I am using.
//*****************************************
void reduce_rtf(String rtf)
{
Pattern rtf_patter = Pattern.compile(RTF);
Matcher rtf_match = rtf_pattern.matcher(rtf);
if (rtf_match.matches())
{
System.out.println(rtf_match.group(1));
}
else
{
System.out.println("No Match");
}
}
private final String rtf = "insrsid\\d*(.*?)\\\\cell \\}";
//*****************************************
and rtf is
----
{\\b\\f2\\fs20\\insrsid4223016 TEXT 1\\cell }\\pard \\ql \\li0\\ri0
\\widctlpar\\intbl\\aspalpha\\aspnum\\faauto\\adjustright\\rin0\\lin0
{\\f2 \\fs20\\insrsid4223016 \\trowd \\irow0\\irowband0\\ts11\\trleft0
\\trftsWidth1 \\clvertalt\\clbrdrt\\brdrnone \\clbrdrl\\brdrnone
\\clbrdrb\\brdrs\\brdrw15 \\clbrdrr\\brdrnone \\cltxlrtb\\clftsWidth3
\\clwWidth18610\\clshdrawnil \\cellx18610\\row }\\trowd \\irow1
\\irowband1\\ts11\\trleft0\\trftsWidth1
\\clvertalt\\clbrdrt\\brdrs\\brdrw15 \\clbrdrl\\brdrnone
\\clbrdrb\\brdrnone \\clbrdrr\\brdrnone \\cltxlrtb\\clftsWidth3
\\clwWidth9370\\clshdrawnil \\cellx9370
\\clvertalt\\clbrdrt\\brdrs\\brdrw15 \\clbrdrl\\brdrnone
\\clbrdrb\\brdrnone \\clbrdrr\\brdrnone \\cltxlrtb\\clftsWidth3
\\clwWidth9240 \\clshdrawnil \\cellx18610\\pard \\ql \\li0\\ri0
\\sb100 \\widctlpar\\intbl\\faauto\\adjustright\\rin0\\lin0 {\\b\\f2
\\fs20 \\insrsid4223016 TEXT 2\\cell }
----