Please illustrate with an example - I'm very interested!
The setting must be stored as a single string - but can be structured - eg
with XML.
This is the current setting I have come up with:
This will categorize company name endings into LLC, BUSINES_CORP etc. I had
to escape the >< to store in an attribute.
<add key="Designations.Match"
value="(?<LLC>\bLimited\s+Company\b\W*$)|(?& lt;LLC>\bLimited\s+Liab
ility\s+Company\b\W*$)|(?<LLC>\bLC\b\W*$)|(? <LLC>\bLLC\b\W*$)|(?
<BUSINESS_CORP>\bCorporation\b\W*$)|(?<BU SINESS_CORP>\bIncorpora
ted\b\W*$)|(?<BUSINESS_CORP>\bLimited\b\W*$) |(?<BUSINESS_CORP>\b
Corp\b\W*$)|(?<BUSINESS_CORP>\bInc\b\W*$)|(? <BUSINESS_CORP>\bLtd
\b\W*$)|(?<BUSINESS_CORP>\bCorporation\b\W*$ )|(?<PROFESSIONAL_CORP&
gt;\bProfessional\s+Corporation\b\W*$)|(?<PROFE SSIONAL_CORP>\bProfessi
onal\s+Corporation\b\W*$)|(?<PROFESSIONAL_CORP& gt;\bProfessional\s+Corp\b
\W*$)|(?<PROFESSIONAL_CORP>\bProf\s+Corp\b\W *$)|(?<PROFESSIONAL_COR
P>\bPC\b\W*$)|(?<PROFESSIONAL_CORP>\bPC\b \W*$)|(?<LLP>\bRegis
tered\s+Limited\s+Liability\s+Partnership\b\W*$)|( ?<LLP>\bLLP\b\W*$)|(
?<LLP>\bLimited\s+Liability\s+Partnership\b\ W*$)|(?<LLP>\bLimite
d\s+LP\b\W*$)|(?<LLP>\bLimited\s+LP\b\W*$)|( ?<LLLP>\bRegistered\
s+Limited\s+Partnership\b\W*$)|(?<LLLP>\bLim ited\s+Partnership\b\W*$)|
(?<LLLP>\bLP\b\W*$)|(?<LLLP>\bRegister ed\s+Limited\s+Liability\s
+Limited\s+Partnership\b\W*$)|(?<LLLP>\bLimi ted\s+Liability\s+Limited\
s+Partnership\b\W*$)|(?<LLLP>\bLimited\s+LLP \b\W*$)|(?<LLLP>\bLL
LP\b\W*$)" />
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP***********************@msnews.microsoft.co m...
Thomas <th****@corpuslogic.com> wrote: Yes - I want the espression to be stored as a dynamic setting for the
application.
Why not store the mapping as a dynamic setting instead, and load that
in at runtime? Certainly if you're using XML for your configuration it
should be very easy to work out a mapping schema - and most other
configuration techniques make it quite easy too.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too