Sounds like you are trying to write a harvesting tool to build a spammer's email address list to me. Since you want to do it in C, I suspect that either you have a huge amount of text to parse, probably from web pages and news group postings, or you need to write a tool that will run inside of a worm or virus to extract email addresses from an address list of a machine you just hacked. Please explain to the list why it would be beneficial to help you. For one, you could just write it in perl and then use one of the perl2c tools out there to translate it into C.
Ramprasad A Padmanabhan writes: > I am writing a c program In which I have some heavy text parsing to do. > Unfortunately I am not very conversant with C or Regex in C > > I have read about embedding perl into C programs, > > Now How Can I do this efficiently > > Suppost I want to parse a Mail To: header and want to extract the emailid > > like take an example > > > @strings = ('"Ram Prasad" <[EMAIL PROTECTED]> ', > '[EMAIL PROTECTED],[EMAIL PROTECTED]'); > > foreach (@strings) { > while(/([EMAIL PROTECTED])/g){ > push @emailids , $1; > } > } > > print "GOT ALL EMAILIDS in @emailids\n"; > > __END__ > > Now think of doing that in C. I will have to spend two weeks learning C > regex libraries before I can do this > > Instead Can I just embed this perl code in my c program > I will be happy if someone can give some links to examples on the net > > Thanks > Ram > > > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]