Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > matching n'th p...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 13 Topic 2216 of 2234
Post > Topic >>

matching n'th pattern...

by tomekl <tomek@[EMAIL PROTECTED] > Apr 6, 2008 at 08:56 AM

Hello !

I'm trying to get text between given html tags, for examle for this
pattern:

foo<li>a</li><li>b</li><li>c</li>bar

I'd like to get
a for parameter 1
b for parameter 2
c for parameter 3

What I've tried so far is this:

echo 'foo<li>a</li><li>b</li><li>c</li>bar' |  gawk
'{ b=gensub("(.*)<li>([^</li>]*)</li>(.*)","\\2",X) ; print b }'

but it returns c no matter of X value, could you help me please?




 13 Posts in Topic:
matching n'th pattern...
tomekl <tomek@[EMAIL P  2008-04-06 08:56:07 
Re: matching n'th pattern...
gazelle@[EMAIL PROTECTED]  2008-04-06 16:17:02 
Re: matching n'th pattern...
tomekl <tomek@[EMAIL P  2008-04-06 09:23:23 
Re: matching n'th pattern...
pk <pk@[EMAIL PROTECTE  2008-04-06 19:51:48 
Re: matching n'th pattern...
pk <pk@[EMAIL PROTECTE  2008-04-06 19:56:43 
Re: matching n'th pattern...
tomekl <tomek@[EMAIL P  2008-04-06 09:25:13 
Re: matching n'th pattern...
tomekl <tomek@[EMAIL P  2008-04-06 10:46:07 
Re: matching n'th pattern...
tomekl <tomek@[EMAIL P  2008-04-06 10:50:01 
Re: matching n'th pattern...
pk <pk@[EMAIL PROTECTE  2008-04-06 20:21:09 
Re: matching n'th pattern...
pk <pk@[EMAIL PROTECTE  2008-04-06 20:46:42 
Re: matching n'th pattern...
tom <tomasz.lutelmowsk  2008-04-06 11:49:09 
Re: matching n'th pattern...
Ed Morton <morton@[EMA  2008-04-06 14:06:02 
Re: matching n'th pattern...
Peter Jasper <usenet77  2008-04-08 02:43:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 3:59:15 CDT 2008.