eregi whitespace detection problem

From: Frank (frankdegrauwe_at_hotmail.com)
Date: 10/30/04


Date: Sat, 30 Oct 2004 15:53:11 +0200

I'm having trouble detecting whitespaces in strings.

Set up this test:

echo "<br>example 1:".intval(eregi("^\s","teststring"));
echo "<br>example 2:".intval(eregi("^\s","test string"));

Both resulting in 0 (zero)

also tried [:space:] and [:blank:] without result

Who can help this regular newbie expressing himself ?



Relevant Pages

  • Re: Referential Integrity and Indexes
    ... >> returns true regardless of what you try to do. ... 2> select baseid, isnullas result ... gets in the way -- in Access you have to try very hard to put a zero ... "Allow Zero Length Strings" then, as seen above, it's on by default. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: trouble with DBA
    ... I recently asked the DBA of the SQLServer database that I use to add a ... "SQL Server does not support a Zero Length String. ... I find zero length strings and nulls confusing in SQL Server. ...
    (comp.databases.ms-access)
  • Re: Explanation???
    ... Hi Lyle, thanks for thew answer. ... You can have thousands of records with zero ... > zero length strings and probably rightly so. ... I was lloking for coincidences: what you say explains is why zero lenght ...
    (comp.databases.ms-access)
  • Re: Explanation???
    ... zero length strings and probably rightly so. ... Maybe a trivial relationship, ie, we don't know what ... You don't have any aunts. ...
    (comp.databases.ms-access)
  • Re: result of strncmp(a,b,0);
    ... Could a or b be NULL when the count is zero? ... the strncmp spec says that the arguments point to ... arguments are strings, it says they're arrays, and for the return value ...
    (comp.std.c)