[xquery-talk] Doing some Pattern Frequency Distribution

Kusunam, Srinivas SKusunam at rlpt.com
Wed Jun 7 16:42:14 PDT 2006

I have a requirement to find out the pattern frequency distribution of
some of the elements say Phone number.

Here is the example

		<PHONE>123-456-7890 </PHONE>
		<PHONE>123-456-7899 </PHONE>
		<PHONE>123.456.7890 </PHONE>
		<PHONE>(123)456-7890 </PHONE>

Output should be something like this:
	Pattern: 999-999-9999	count:2
	Pattern: 999.999.9999 	count:1
	Pattern: (999)999-9999  count:1

Is it possible to achieve this using XQuery? If yes how do we do this?
Any pointers or suggestions are welcome.

This message has originated from RLPTechnologies,
26955 Northwestern Highway, Southfield, MI 48034.

RLPTechnologies sends various types of email
communications.  If this email message concerns the
potential licensing of an RLPT product or service, and
you do not wish to receive further emails regarding Polk
products, forward this email to Do_Not_Send at rlpt.com
with the word "remove" in the subject line.

The email and any files transmitted with it are confidential
and intended solely for the individual or entity to whom they
are addressed.

If you have received this email in error, please delete this
message and notify the Polk System Administrator at
postmaster at rlpt.com.

More information about the talk mailing list