ara [dot] t [dot] howard [at] noaa [dot] gov
all happiness comes from the desire for others to be happy. all misery
comes from the desire for oneself to be happy.
-- bodhicaryavatara
> ara [dot] t [dot] howard [at] noaa [dot] gov
> all happiness comes from the desire for others to be happy. all misery
> comes from the desire for oneself to be happy.
> -- bodhicaryavatara
ara [dot] t [dot] howard [at] noaa [dot] gov
all happiness comes from the desire for others to be happy. all misery
comes from the desire for oneself to be happy.
-- bodhicaryavatara
ara [dot] t [dot] howard [at] noaa [dot] gov
all happiness comes from the desire for others to be happy. all misery
comes from the desire for oneself to be happy.
-- bodhicaryavatara
> ara [dot] t [dot] howard [at] noaa [dot] gov
> all happiness comes from the desire for others to be happy. all misery
> comes from the desire for oneself to be happy.
> -- bodhicaryavatara
/\1/ seems to work.
--
ara [dot] t [dot] howard [at] noaa [dot] gov
all happiness comes from the desire for others to be happy. all misery
comes from the desire for oneself to be happy.
-- bodhicaryavatara
indeed i did - but i thought that a subject like that would lead to people
skiiming it and thinking i was having problems with my regex - that it didn't
match anything!
I think you mean 'a regex which doesn't match anything'; surely
/^$/ is a regex which matches nothing?
--
ara [dot] t [dot] howard [at] noaa [dot] gov
all happiness comes from the desire for others to be happy. all misery
comes from the desire for oneself to be happy.
-- bodhicaryavatara
I think you mean 'a regex which doesn't match anything'; surely
/^$/ is a regex which matches nothing?
No, he meant a regex that always fails.
--
ara [dot] t [dot] howard [at] noaa [dot] gov
all happiness comes from the desire for others to be happy. all misery
comes from the desire for oneself to be happy.
-- bodhicaryavatara
you win the golf contest i think... that seems to be the shortest possible...
Same number of chars:
/.^/
--
ara [dot] t [dot] howard [at] noaa [dot] gov
all happiness comes from the desire for others to be happy. all misery
comes from the desire for oneself to be happy.
-- bodhicaryavatara
>
>>> comments?
>>
>> I think you mean 'a regex which doesn't match anything'; surely
>> /^$/ is a regex which matches nothing?
>
> No, he meant a regex that always fails.
lol!
ok. before this gets out of hand, what i meant was
regex =~ any_possible_string #=> false
<nitpick>That never happens in Ruby. =~ returns nil if the expression
and the string passed to it do not match.</nitpick>
I would guess that it should be possible to put all possible characters
between [ and ], and negate that.
I think /\z\a/ should do the trick, too (from experimentation, I can not
find anything that matches it, but maybe I haven't thought/experimented
enough about/with it)
Finally, I think one can to build a not-too-long regex that only matches
strings of length larger than addressable memory, using something like:
/((x{1000000000}){1000000000}){1000000000}/
If you repeat that pattern a couple of times you get a regular
expression that, for all practical purposes, will match nothing.
>ara.t.howard@noaa.gov wrote:
>>On Fri, 16 Dec 2005, C Erler wrote:
>>>/\1/ seems to work.
>>
>>
>>you win the golf contest i think... that seems to be the shortest
>>possible...
>
>Same number of chars:
>
> /.^/