GIDForums  

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 19-May-2004, 03:42
henrywidd henrywidd is offline
New Member
 
Join Date: May 2004
Posts: 1
henrywidd is on a distinguished road

help with gnu regular expressions


Hi, I am trying to use POSIX regular expressions...I am quite new to C and it is hard to find examples of their usage.

I have written a simple program which reads in an XML file and should match against different XML/HTML constructs:

e.g '<(\\w+)>' , '</(\\w+)>' and so on.

It compiles and must only be missing something minor. At present it reports no matches found for any line in any html/xml document it is run against.

The file can be found at rose.clear.bash.sh

I'm sure someone who knows about these things would only need to look at it for 2 secs to tell me what is wrong. I greatly appreciate advice that anyone can give me, thanks,

Henry Widd
  #2  
Old 19-May-2004, 06:45
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Hello henrywidd,

How do you know that this is POSIX and not PCRE?

Anyway, try these patterns out and see if they make a difference:

Opening tag:
Code:
"<([a-zA-Z]+)[^>]*>"

Closing tag:
Code:
"</([a-zA-Z]+)>"
 
 

Recent GIDBlogUS Elections and the ?Voter?s Responsibility? by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
regular expressions erniegerdie MySQL / PHP Forum 6 08-Mar-2004 06:46
preg_replace question... Perculator MySQL / PHP Forum 6 16-Feb-2004 22:25
preg_replace + regular expression EasyExpat MySQL / PHP Forum 4 10-Jul-2003 05:36
Regular Expressions question. JdS MySQL / PHP Forum 3 04-Nov-2002 15:04

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 07:43.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.