[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Safe user-facing pattern matching.
- From: Martin <eden_martin_fuhrspam@...>
- Date: Sun, 30 Apr 2017 23:22:50 -0700
On 04/29/2017 08:34 AM, Gé Weijers wrote:
>> On Apr 28, 2017, at 23:44, Martin <email@example.com
>> <mailto:firstname.lastname@example.org>> wrote:
>> On 04/24/2017 12:12 PM, Gé Weijers wrote:
>>> Here's another problem:
>>> This won't match if the number of b's is larger than the sum of the
>>> numbers of a's and c's. And "%bab" matches "a-+abb", for instance,
>>> whereas "a*" won't match any letters except 'a'.
>> I didn't catch problem, could you provide sample strings that matched
>> and not matched by pattern?
> “aaaaaaaaaaaaaabbbbccccccccccccc” will match
> “abbbbbbc” won’t match
Thank you for samples. Now I have better feeling for given problem. But
letters balance is necessary but not sufficient condition:
"bacb" is not valid but "abbc" is, while these strings belongs to same
Also thank you for good example:
> like strings that
> represent arithmetic expressions that evaluate to 42, and that does not
> have intermediate values outside the range [-1000, 1000].
I just have feeling that there are concepts that humans just unable to
understand biologically (like seeing radiowaves). So for given example
exists formal language describing it but we can't construct it. Even it
is given, we can't understand it.
All we can is to "understand" _some_ abstractions like "natural number",
"factorization". But we can't "see" is number "prime" or not.
At most, we can construct algorithms that shows that some things we
can't "feel" is true or false. (Like SHA function of a text.)