CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Searching Help

  1. #1
    Join Date
    Jan 2009
    Posts
    19

    Searching Help

    I want to search a csv file say

    I have a csv text in file like

    rest, 23
    jack,456
    now,345

    where first one is "word" other is "code" corresponding to the word

    I want to search for code and write it in another file say four.txt

    Any help would be really appreciated just point me to a direction

    Thanks in advance

  2. #2
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: Searching Help

    Quote Originally Posted by Abhishek Chauhan View Post
    I want to search a csv file say
    ...
    Simple parse the file for commas then checking if the expression is text or numeric for example using Regex
    other way is to split all the file by use of comma as the splittersign then checking each string if its numeric. Simple
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  3. #3
    Join Date
    Jan 2009
    Posts
    19

    Re: Searching Help

    i want to know if this kind of search is possible through LINQ . I have already used a regex function to split all the unnecessary charachters.

    because My design was to load the file into the project and just search on it using LINQ . I've tried few times but I am not able to figure out how??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured