Pattern checking.

This is a discussion on Pattern checking. within the C++ Programming forums, part of the General Programming Boards category; I want to check whether the string in my char [] variable matches a specific pattern like "NN/NN/NNNN". How ca ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    3

    Pattern checking.

    I want to check whether the string in my char [] variable matches a specific pattern like "NN/NN/NNNN". How ca I do that?

    Thanks,
    C.Balaji

  2. #2
    Lead Moderator kermi3's Avatar
    Join Date
    Aug 1998
    Posts
    2,595
    Ok. What don't you understand about it? Do you understand the method? If not what do you understand about it? No one is going to do the code for you but if you have some done post it and I'm sure someone will help ou with what you have
    Kermi3

    If you're new to the boards, welcome and reading this will help you get started.
    Information on code tags may be found here

    - Sandlot is the highest form of sport.

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    3
    I don't know whether you replied to my port or not. Anyway, I have done the code. I have to go through each and every character in the string and compare it. Its working but its ugly. I was expecting some C++ string function to do the same. Hope this time I am clear.

  4. #4
    i want wookie cookies the Wookie's Avatar
    Join Date
    Oct 2002
    Posts
    455
    you need various string functions, usually one string would be a pattern, the other one the string itself, and you'd compare them

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. pattern checking in a string question..
    By transgalactic2 in forum C Programming
    Replies: 31
    Last Post: 12-26-2008, 04:54 PM
  2. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 10:38 AM
  3. Interpreter.c
    By moussa in forum C Programming
    Replies: 4
    Last Post: 05-28-2008, 06:59 PM
  4. Problems about gcc installation
    By kevin_cat in forum Linux Programming
    Replies: 4
    Last Post: 08-09-2005, 10:05 AM
  5. text pattern recognition
    By mtsmox in forum C++ Programming
    Replies: 5
    Last Post: 02-27-2002, 08:38 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21