Cisco Cisco Collaboration Server Dynamic Content Adapter
DCA 2.01 Administration and Configuration Guide
About the Accept Element 116
About the Accept Element
In a Rule, you specify document text to be matched in one or more Accept elements.
An Accept element contains a regular expression that you use to match text strings
in a parsed page. This matched text can then be modified or acted upon in some
way, as specified in the Script element. Accept statements must be specified in Perl5
syntax.
An Accept element contains a regular expression that you use to match text strings
in a parsed page. This matched text can then be modified or acted upon in some
way, as specified in the Script element. Accept statements must be specified in Perl5
syntax.
--------------------------------------------------------------------------------------------
<ACCEPT name="matchHREFs" subgroups="1,3">
<![CDATA[<A\s([^><]*?)HREF\s*=\s*'\s*([^']*?)\s*'([^><]*?)>]]>
</ACCEPT>
--------------------------------------------------------------------------------------------
Accept Attributes
You can use the following attributes with the Accept element:
Attribute: Description:
Required? Example:
name
The name of the Accept
statement. Must be
unique.
Yes <ACCEPT
name="myaccept">
subgroups
Comma-delimited list of
regular expressions that
regular expressions that
will be recursively parsed.
Subgroups appearing in an
Accept statement are
numbered left to right.
Specify subgroups:
<initialgroupnumber>,
Specify subgroups:
<initialgroupnumber>,
<numberof subgroups>
No <ACCEPT
name="myaccept"
subgroups="1,3">
Writing Accept Statements
In writing Accept statements, care must be taken to create rules that only target the
expected text, no more, no less. This can be very difficult to do, and is the most
time-consuming aspect of parser customization.
expected text, no more, no less. This can be very difficult to do, and is the most
time-consuming aspect of parser customization.