Skip to content

Instantly share code, notes, and snippets.

<cfset rsData.PropertyType = "Multifamily">
<cfif len(rsData.PropertyType)>
<cfif rsData.PropertyType neq "multifamily">
<cfset rsData.PropertyType = uCase(left(rsData.PropertyType, 1)) & lCase(right(rsData.PropertyType, len(rsData.PropertyType) - 1))>
<cfelse>
<cfset rsData.PropertyType = "MultiFamily">
</cfif>
</cfif>
<cfset rsData.PropertyType = "residential">
<cfif len(rsData.PropertyType)>
<cfset rsData[ "PropertyType" ][ rsData.CurrentRow ] = uCase(left(rsData.PropertyType, 1)) & lCase(right(rsData.PropertyType, len(rsData.PropertyType) - 1))>
</cfif>
<cfset local.PropertyType = "residential">
<select class="form-control" name="PropertyType" id="transaction_maintain_form-PropertyType">
<option value="">None</option>
<option value="Residential" <cfif local.PropertyType eq "Residential"> SELECTED</cfif>>Residential</option>
<option value="Commercial" <cfif local.PropertyType eq "Commercial"> SELECTED</cfif>>Commercial</option>
<option value="Land" <cfif local.PropertyType eq "Land"> SELECTED</cfif>>Land</option>
<option value="MultiFamily" <cfif local.PropertyType eq "MultiFamily"> SELECTED</cfif>>MultiFamily</option>
</select>
<cfset local.PropertyType = "Residential">
<select class="form-control" name="PropertyType" id="transaction_maintain_form-PropertyType">
<option value="">None</option>
<option value="Residential" <cfif local.PropertyType eq "Residential"> SELECTED</cfif>>Residential</option>
<option value="Commercial" <cfif local.PropertyType eq "Commercial"> SELECTED</cfif>>Commercial</option>
<option value="Land" <cfif local.PropertyType eq "Land"> SELECTED</cfif>>Land</option>
<option value="MultiFamily" <cfif local.PropertyType eq "MultiFamily"> SELECTED</cfif>>MultiFamily</option>
</select>
<cfset local.PropertyType = "residential">
<select class="form-control" name="PropertyType" id="transaction_maintain_form-PropertyType">
<option value="">None</option>
<option value="Residential" <cfif CompareNoCase(local.PropertyType,"Residential")> SELECTED</cfif>>Residential</option>
<option value="Commercial" <cfif local.PropertyType eq "Commercial"> SELECTED</cfif>>Commercial</option>
<option value="Land" <cfif local.PropertyType eq "Land"> SELECTED</cfif>>Land</option>
<option value="MultiFamily" <cfif local.PropertyType eq "MultiFamily"> SELECTED</cfif>>MultiFamily</option>
</select>
<cffunction name="extractMetaContent" access="private" returntype="string">
<cfargument name="emailBody" type="string" required="true">
<cfargument name="metaName" type="string" required="true">
<!--- Try double quotes first - handle variable spacing and closing tag variations --->
<cfset var pattern = '(?i)<meta\s+name="?' & arguments.metaName & '"?\s+content="([^"]*)"[^>]*>'>
<cfset var result = ReFindNoCase(pattern, arguments.emailBody, 1, true)>
<!--- If not found, try single quotes --->
<cfif ArrayLen(result.pos) lt 2>
<cffunction name="extractMetaContent" access="private" returntype="string">
<cfargument name="emailBody" type="string" required="true">
<cfargument name="metaName" type="string" required="true">
<!--- Try double quotes first - handle variable spacing and closing tag variations --->
<cfset var pattern = '(?i)<meta\s+name="?' & arguments.metaName & '"?\s+content="([^"]*)"[^>]*>'>
<cfset var result = ReFindNoCase(pattern, arguments.emailBody, 1, true)>
<!--- If not found, try single quotes --->
<cfif ArrayLen(result.pos) lt 2>
<cffunction name="extractMetaContent" access="private" returntype="string">
<cfargument name="emailBody" type="string" required="true">
<cfargument name="metaName" type="string" required="true">
<!--- Try double quotes first - handle variable spacing and closing tag variations --->
<cfset var pattern = '(?i)<meta\s+name="?' & arguments.metaName & '"?\s+content="([^"]*)"[^>]*>'>
<cfset var result = ReFindNoCase(pattern, arguments.emailBody, 1, true)>
<!--- If not found, try single quotes --->
<cfif ArrayLen(result.pos) lt 2>
<cfscript>
/*
texte = "KAMER-1E ZITTING VAN DE 56E ZITTINGSPERIODE 2024 CHAMBRE-1E SESSION DE LA 56E LEGISLATURE CRIV 56 PLEN 001 CRIV 56 PLEN 001 BELGISCHE KAMER VAN VOLKSVERTEGENWOORDIGERS CHAMBRE DES REPRÉSENTANTS DE BELGIQUE INTEGRAAL VERSLAG MET VERTAALD BEKNOPT VERSLAG COMPTE RENDU INTÉGRAL AVEC COMPTE RENDU ANALYTIQUE TRADUIT Plenumvergadering Séance plénière Donderdag Jeudi 04-07-2024 04-07-2024 Namiddag Après-midi";
regex = "(?i)CRIV\\s+(\\d{2})\\s+PLEN\\s+(\\d{3,4})";
//match = REFindNoCase(regex, texte, 1, true);
match = REMatch(regex, texte);
<cfscript>
dataAreas = findDataArea
a = dataAreas.filter(compayname);
siwakeTransfer = structNew();
for(siwake)
{
b = a.filter(from <= siwake.date <= to);
if len(b) != 1
{
loi~