![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>
>
=IF(AND(OR(UPPER(LEFT(A1,1))="S"),UPPER(LEFT(A1,1))="H"),UPPER(MID(A1,2,1))="D",NOT(ISERROR(SEARCH(MID(A1,3,1),"ABCDEFGHIJKLMNOPQRSTUVWXYZ")))))
>
>
> (I hope I didn't mess up my parentheses!)
I didn't mess up my parentheses, but forgot to put
,"Hard disk is on fire",""
before the last parenthesis.
--
/*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
/* flabreque */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
/* @ */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
/* gmail.com */}camera{orthographic location<6,1.25,-6>look_at a }
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Having nothing but english words
> instead of various puctuation signs does not guarantee clarity.
No. But it can help a lot. I won't have to go look up what my code
snippet does if I come back to it in 6 months' time.
>> Have I ever mentioned that I also really hate Perl?
>>
>> Of course, the only reason that anybody ever uses Perl is because it has
>> built-in regex support. This, together with low-level text munging, is
>> literally ALL PERL DOES! >_<
>
> Yes, and a all a hammer does is push (and in some cases pull) on nails.
> It doesn't mean that a hammer is not useful, or the best tool for that
> particular job.
>
> Text munging is a big part of many people's lives. (If you consider
> sysadmins to be people, of course)
The thing is, text munging is fundamentally /wrong/. It's something that
should be avoided at all costs. So an entire language designed to
perform a task that you shouldn't perform in the first place...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 7/19/2012 3:53, Invisible wrote:
> oneOf "sh"
> char 'd'
> letter
>
> You don't even need to know which parsing library or what programming
> language this is to figure out that it matches three characters.
Really? I would not have guessed that "one of sh" means "one of the
characters in the string" vs "one instance of the string 'sh'"
> Of course, the only reason that anybody ever uses Perl is because it has
> built-in regex support. This, together with low-level text munging, is
> literally ALL PERL DOES! >_<
It's a report generation language. It's right in the name. What did you
expect? Did you ever read any RPG (Report Program Generator) code?
--
Darren New, San Diego CA, USA (PST)
"Oh no! We're out of code juice!"
"Don't panic. There's beans and filters
in the cabinet."
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>> oneOf "sh"
>> char 'd'
>> letter
>>
>> You don't even need to know which parsing library or what programming
>> language this is to figure out that it matches three characters.
>
> Really? I would not have guessed that "one of sh" means "one of the
> characters in the string" vs "one instance of the string 'sh'"
OK. So it's not completely trivial. Easier than trying to guess what
"[s|h]" is meant to mean though. :-P
>> Of course, the only reason that anybody ever uses Perl is because it has
>> built-in regex support. This, together with low-level text munging, is
>> literally ALL PERL DOES! >_<
>
> It's a report generation language. It's right in the name.
Funny, I could have sworn I already /said/ that. ;-)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Am 19.07.2012 21:34, schrieb Orchid Win7 v1:
>>> oneOf "sh"
>>> char 'd'
>>> letter
>>>
>>> You don't even need to know which parsing library or what programming
>>> language this is to figure out that it matches three characters.
>>
>> Really? I would not have guessed that "one of sh" means "one of the
>> characters in the string" vs "one instance of the string 'sh'"
>
> OK. So it's not completely trivial. Easier than trying to guess what
> "[s|h]" is meant to mean though. :-P
Nonsense. First of all it's "(s|h)". Now, the parentheses should be no
problem to decipher for anyone familiar with the basics of mathematics:
There, it is used to override operator precedence by grouping parts of
the term into a sub-term. Same in RegExes; it should be pretty easy to
come to the presumption that "(s|h)" means "a group of characters that
matches 's|h'".
Now for the "|", this is quite a well established symbol for an "or"
operation in various languages (e.g. C, POV-Ray SDL, etc.). With this in
mind, it's a matter of seconds to realize that "s|h" might mean "'s' or
'h'".
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 2012-07-19 16:30, clipka wrote:
> Now for the "|", this is quite a well established symbol for an "or"
> operation in various languages (e.g. C, POV-Ray SDL, etc.). With this in
> mind, it's a matter of seconds to realize that "s|h" might mean "'s' or
> 'h'".
And the "s|h" form is visually similar enough to the more-common
"and/or" that even if you didn't happen to know that | meant 'or', you'd
have a better-than-zero chance of guessing its intent.
(So what is the result of &/| anyways?)
--
Tim Cook
http://empyrean.sjcook.com
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Am 20.07.2012 00:04, schrieb Tim Cook:
> On 2012-07-19 16:30, clipka wrote:
>> Now for the "|", this is quite a well established symbol for an "or"
>> operation in various languages (e.g. C, POV-Ray SDL, etc.). With this in
>> mind, it's a matter of seconds to realize that "s|h" might mean "'s' or
>> 'h'".
>
> And the "s|h" form is visually similar enough to the more-common
> "and/or" that even if you didn't happen to know that | meant 'or', you'd
> have a better-than-zero chance of guessing its intent.
>
> (So what is the result of &/| anyways?)
Related question: 2b|!2b?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 07/19/2012 06:14 PM, clipka wrote:
> Related question: 2b|!2b?
LOL ... clever and thought provoking at the same time
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 7/19/2012 3:14 PM, clipka wrote:
>
> Related question: 2b|!2b?
True, very true.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Orchid Win7 v1 <voi### [at] dev null> wrote:
> >> oneOf "sh"
> >> char 'd'
> >> letter
> >>
> >> You don't even need to know which parsing library or what programming
> >> language this is to figure out that it matches three characters.
> >
> > Really? I would not have guessed that "one of sh" means "one of the
> > characters in the string" vs "one instance of the string 'sh'"
> OK. So it's not completely trivial. Easier than trying to guess what
> "[s|h]" is meant to mean though. :-P
Your complaint seems to be that the meaning of regexes may be hard to
guess for somebody who does not know their syntax. That's an inane
complaint.
I tried to explain that in my previous post, but seemingly you didn't
understand.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |