Click here to get back home

eregi

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
eregi Kill Joy 07-16-2008
|--> Re: eregi Juergen-Bernhar...07-16-2008
---> Re: eregi Juergen-Bernhar...07-16-2008
|   ---> Re: eregi Jerry Stuckle07-17-2008
Posted by Kill Joy on July 16, 2008, 11:47 am
Please log in for more thread options
Hi all.

I have a file that stats with
___________________________________
/* Vim-generated file */
//Generated settings file for Vim project.
...
.......
___________________________________

I open it with:

___________________________________
$log = file("project_vim.js");

foreach($log as $value){
        if(eregi("vim", $value)) {
                echo $value."";
        }
}
___________________________________


But I match nothing

Why?

Many thanks.

Cheers.

Gius.

Posted by Juergen-Bernhard Adler on July 16, 2008, 6:20 pm
Please log in for more thread options
Kill Joy wrote:

> foreach($log as $value){
> if(eregi("vim", $value)) {
> echo $value."";
> }
> }


Hi Gius,

I tried it and it worked for me:
i.e. I duly received these two lines!

???

Cheers

juergen

Posted by Juergen-Bernhard Adler on July 16, 2008, 7:03 pm
Please log in for more thread options
Kill Joy wrote:

> foreach($log as $value){
> if(eregi("vim", $value)) {
> echo $value."";
> }
> }


Hi Gius,

I tried it and it worked for me:
i.e. I duly received these two lines:

/* Vim-generated file */
//Generated settings file for Vim project.

???

Cheers

juergen

Posted by Kill Joy on July 17, 2008, 3:11 am
Please log in for more thread options
I have a file generated by an application. If I search on this file I
get nothing.
But if I copy and paste the content of this file into another file,
with the second file
it works. Why?

Cheers.

Gius.

> Kill Joy wrote:
> > foreach($log as $value){
> > if(eregi("vim", $value)) {
> > echo $value."";
> > }
> > }
>
> Hi Gius,
>
> I tried it and it worked for me:
> i.e. I duly received these two lines:
>
> /* Vim-generated file */
> //Generated settings file for Vim project.
>
> ???
>
> Cheers
>
> juergen


Posted by Jerry Stuckle on July 17, 2008, 6:31 am
Please log in for more thread options
Kill Joy wrote:
>> Kill Joy wrote:
>>> foreach($log as $value){
>>> if(eregi("vim", $value)) {
>>> echo $value."";
>>> }
>>> }
>> Hi Gius,
>>
>> I tried it and it worked for me:
>> i.e. I duly received these two lines:
>>
>> /* Vim-generated file */
>> //Generated settings file for Vim project.
>>
>> ???
>>
>> Cheers
>>
>> juergen
>
>
> I have a file generated by an application. If I search on this file I
> get nothing.
> But if I copy and paste the content of this file into another file,
> with the second file
> it works. Why?
>
> Cheers.
>
> Gius.
>

Let's see... My crystal ball says it could be (in no particular order):

File format
File permissions
File still open
A bug in your code
Something else

But it can't tell which of the above might be the problem. It does,
however, ask you not to top post.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================


Similar ThreadsPosted
eregi and eregi replace January 10, 2006, 11:50 pm
eregi help? September 17, 2005, 9:04 pm
eregi June 2, 2007, 5:58 am
eregi() question August 18, 2005, 12:11 am
eregi whitespace detection problem October 30, 2004, 4:53 pm
Help with email address validation using eregi() December 2, 2004, 3:19 am
simple eregi not working (PEBCAK) December 4, 2004, 7:19 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap