Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple grep

Status
Not open for further replies.

arcnon

Programmer
Aug 12, 2003
242
0
0
US
match
^<data> but not ^-<data>

thanks
 
Sorry, maybe i'm being dense, but...was there a question in there somewhere?

--G
 
I think this is what you're looking for.

Code:
my @test = ("Some Text", "-Some More Text");
print grep {/^[^-].*/} @test;
 
never mind what I had is working. I restarted and working as expected but data was the search word it is a xml type format

<data>
-<data>
#<data>blah<data>#
<>
-<data>
</data>

you name it there is a special character and <data> </data>
pretty stupid format they should at least put it in the <> a somewhat sounder way.

Anyway sorry for the poor question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top