posix regex

This is a discussion on posix regex within the Linux Programming forums, part of the Platform Specific Boards category; Hi! C posix regex library has a matching system, but how to use it. If I execute pattern: \".+\" against ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    2

    posix regex

    Hi!
    C posix regex library has a matching system, but how to use it.
    If I execute pattern: \".+\" against string: <a href="http://localhost/#" style="color: black"> and set PMATCH[] non-null, how could find out the start and end positions of substring "http://localhost/#" also "color: black" in string. Or is there any easier way to parse html-lines in C. Example code please!

    Edit: There was a bug in the pattern

  2. #2
    Registered User linuxdude's Avatar
    Join Date
    Mar 2003
    Location
    Louisiana
    Posts
    926
    What do you get when you run that. I am not good at regular expressions though here but here is a tutorial

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    2
    Actually I'm just interested in how the registers work in posix regex.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Posix Regex in C
    By march5th in forum C Programming
    Replies: 13
    Last Post: 12-28-2008, 08:59 AM
  2. My own regex...............class?
    By misplaced in forum C++ Programming
    Replies: 5
    Last Post: 04-08-2005, 09:18 AM
  3. <regex.h> regex syntax in C
    By battersausage in forum C Programming
    Replies: 7
    Last Post: 03-24-2004, 12:35 PM
  4. POSIX on windows anyone?
    By Lynux-Penguin in forum Linux Programming
    Replies: 1
    Last Post: 08-27-2003, 12:56 AM
  5. How is regex used?
    By Strider in forum C++ Programming
    Replies: 0
    Last Post: 12-14-2001, 07:15 AM

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