Share
Explore

icon picker
Puzzle

solved without Regex, we use simple functions
info

why this doc?

It shows you can solve many complex calculations using mainly simple functions

The blog:

The text we took as starting point: a summary:

The Terms & Conditions specify the rights and obligations of both the job seeker and the employer. Blake & Partners, a private recruitment agency, complies with the Law on the Protection of Privacy and stores personal data exclusively for assessing an application. The website prohibits transmission of information to third parties without Blake & Partners' prior consent, but copies for personal use are allowed. Blake & Partners is not responsible for the completeness, accuracy or validity of the information published. Any information provided to Blake & Partners must not contain defamatory or slanderous information or information not reasonably related to the job profile. Blake & Partners provides candidates specializing in finance for recruitment purposes. The fees charged by Blake & Partners are set in accordance with the general terms and conditions and are payable as soon as a candidate is recruited. Blake & Partners offers a guarantee for the qualifications, professional competence, and conduct of the candidate presented for a period of eight weeks. The guarantee cannot be invoked in certain cases, such as if the recruitment is cancelled without any valid reason. The contractual conditions are governed by Belgian law, and the French version of these contractual conditions is the one that prevails in case of any dispute. Written by Anne-Marie.

Step 01 : turn the text into a list of words

The
Terms
&
Conditions
specify
the
rights
and
obligations
of
both
the
job
seeker
and
the
employer.
Blake
&
Partners,
a
private
recruitment
agency,
complies
with
the
Law
on
the
 Show 183 more
_prompt1.Split(" ")

Step 02: filter out non letters and numbers

[
t
h
e
]
[
t
e
r
m
s
]
[
&
]
[
c
o
n
d
i
t
i
o
n
s
]
[
s
p
e
c
i
f
y
]
[
t
h
e
]
[
r
i
g
h
t
s
]
[
a
n
d
]
[
o
b
l
i
g
a
t
i
o
n
s
]
[
o
f
]
[
b
o
t
h
]
[
t
h
e
]
[
j
o
b
]
[
s
e
e
k
e
r
]
[
a
n
d
]
[
t
h
e
]
[
e
m
p
l
o
y
e
r
]
[
b
l
a
k
e
]
[
&
]
[
p
a
r
t
n
e
r
s
]
[
a
]
[
p
r
i
v
a
t
e
]
[
r
e
c
r
u
i
t
m
e
n
t
]
[
a
g
e
n
c
y
]
[
c
o
m
p
l
i
e
s
]
[
w
i
t
h
]
[
t
h
e
]
[
l
a
w
]
[
o
n
]
[
t
h
e
]
 Show 183 more

List(
"0","1","2","3","4","5","6","7","8","9",
"a", "b", "c", "ç", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
"&", "ä", "å", "æ", "ö", "ü","-").WithName(theLetterlist,

_prompt1.Split(" ").WithName(base,
base.ForEach(CurrentValue.Lower().Split('').Filter(CurrentValue.Contains(theLetterlist)))
))

Step 03: unique words

theterms&conditionsspecifyrightsandobligationsofbothjobseekeremployerblakepartnersaprivaterecruitmentagencycomplieswithlawonprotectionprivacystorespersonaldataexclusivelyfor Show 85 more
List("&","a", "b", "c", "ç", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "ä", "å", "æ", "ö", "ü","-").WithName(theLetterlist,

_prompt1.Split(" ").WithName(base,
base.ForEach(CurrentValue.Lower().Split('').Filter(CurrentValue.Contains(theLetterlist))
).Unique().ForEach(CurrentValue.Join("")).WithName(theWords,theWords)))

Step 04 unique letter counts

012345678910111214
List(
"0","1","2","3","4","5","6","7","8","9",
"a", "b", "c", "ç", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
"&", "ä", "å", "æ", "ö", "ü","-").WithName(theLetterlist,

_prompt1.Split(" ").WithName(base,
base.ForEach(CurrentValue.Lower().Split('').Filter(CurrentValue.Contains(theLetterlist))
).ForEach(CurrentValue.Join("")).WithName(theWords,
theWords.ForEach(CurrentValue.Length()).Unique().Sort().WithName(theLenghts, theLenghts
))))

Step 05 - count the unique numbers

1234567891011121314
List(
"0","1","2","3","4","5","6","7","8","9",
"a", "b", "c", "ç", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
"&", "ä", "å", "æ", "ö", "ü","-").WithName(theLetterlist,

_prompt1.Split(" ").WithName(base,
base.ForEach(CurrentValue.Lower().Split('').Filter(CurrentValue.Contains(theLetterlist))
).Unique().ForEach(CurrentValue.Join("")).WithName(theWords,
theWords.ForEach(CurrentValue.Length()).Unique().Sort().WithName(theLenghts,
Sequence(1,theLenghts.Count()).ForEach(CurrentValue.WithName(theNbrLenghts, theNbrLenghts))))))

Step 06 - get the words by character count

[][&a][ofonantoisorinbyasbeif][theandjoblawforbutusearenotanysetone][bothwithdatamustfeessoonsuchthatcase][termsblakethirdprioreightweekscasesvalidthese][rightsseekeragencystorescopiesoffersperiodcannotreasonfrench][specifyprivateprivacywebsitepartieswithoutconsentallowedcontainrelatedprofilefinancechargedgeneralpayableconductinvokedcertainbelgianversiondisputewritten][employerpartnerscompliespersonalaccuracyvalidityprovidedprovidespurposesgovernedprevails][assessingprohibitspublishedcandidaterecruitedguaranteepresentedcancelled][conditionsprotectiondefamatoryslanderousreasonablycandidatesaccordancecompetenceanne-marie][obligationsrecruitmentexclusivelyapplicationinformationresponsiblecontractual][transmissioncompletenessspecializingprofessional][qualifications]
List(
"0","1","2","3","4","5","6","7","8","9",
"a", "b", "c", "ç", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
"&", "ä", "å", "æ", "ö", "ü","-").WithName(theLetterlist,

_prompt1.Split(" ").WithName(base,
base.ForEach(CurrentValue.Lower().Split('').Filter(CurrentValue.Contains(theLetterlist))
).Unique().ForEach(CurrentValue.Join("")).WithName(theWords,
theWords.ForEach(CurrentValue.Length()).Unique().Sort().WithName(theLenghts,
Sequence(1,theLenghts.Count()).ForEach(CurrentValue.WithName(theNbrLenghts,
theWords.Filter(CurrentValue.Length().Contains(theLenghts.Nth(theNbrLenghts))).WithName(outCome, outCome)))))))

Step 07- format the outcome

0 words with 1 character:
2 words with 2 characters:
&, a
11 words with 3 characters:
of, on, an, to, is, or, in, by, as, be, if
12 words with 4 characters:
the, and, job, law, for, but, use, are, not, any, set, one
9 words with 5 characters:
both, with, data, must, fees, soon, such, that, case
9 words with 6 characters:
terms, blake, third, prior, eight, weeks, cases, valid, these
10 words with 7 characters:
rights, seeker, agency, stores, copies, offers, period, cannot, reason, french
22 words with 8 characters:
specify, private, privacy, website, parties, without, consent, allowed, contain, related, profile, finance, charged, general, payable, conduct, invoked, certain, belgian, version, dispute, written
11 words with 9 characters:
employer, partners, complies, personal, accuracy, validity, provided, provides, purposes, governed, prevails
8 words with 10 characters:
assessing, prohibits, published, candidate, recruited, guarantee, presented, cancelled
9 words with 11 characters:
conditions, protection, defamatory, slanderous, reasonably, candidates, accordance, competence, anne-marie
7 words with 12 characters:
obligations, recruitment, exclusively, application, information, responsible, contractual
4 words with 13 characters:
transmission, completeness, specializing, professional
1 word with 14 characters:
qualifications

List(
"0","1","2","3","4","5","6","7","8","9",
"a", "b", "c", "ç", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
"&", "ä", "å", "æ", "ö", "ü","-").WithName(theLetterlist,

_prompt1.Split(" ").WithName(base,
base.ForEach(CurrentValue.Lower().Split('').Filter(CurrentValue.Contains(theLetterlist))
).Unique().ForEach(CurrentValue.Join("")).WithName(theWords,
theWords.ForEach(CurrentValue.Length()).Unique().Sort().WithName(theLenghts,
Sequence(1,theLenghts.Count()).ForEach(CurrentValue.WithName(theNbrLenghts,
theWords.Filter(CurrentValue.Length().Contains(theLenghts.Nth(theNbrLenghts))).WithName(outCome,
Format(
"{1} {2} with {3} {4}:
{5}",
outCome.Count(),
If(outCome.Count() = 1 ,"word","words"),
theNbrLenghts,
If(theNbrLenghts = 1,'character','characters'),
outCome.ToText().ListCombine()
)))).BulletedList()))))


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.