Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Regular expressions help
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Dutch
View previous topic :: View next topic  
Author Message
gondolin
Apprentice
Apprentice


Joined: 09 Apr 2003
Posts: 158

PostPosted: Sun Jan 16, 2005 3:32 pm    Post subject: Regular expressions help Reply with quote

Hoi,

ik krijg dit niet aan de praat met sed, m'n regular expression zijn goed maar ik heb m'n boek van sed niet thuis.

string (een lijn):
<TR><TD><font face=arial size=2>IP Address</TD><TD ALIGN=CENTER>192.168.123.220</TD><TD ALIGN=CENTER><font face=arial size=2>

m'n regular expressie:
[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*

dit werkt volgens m'n regex coach maar het lukt neit met sed.
Back to top
View user's profile Send private message
gdq
Tux's lil' helper
Tux's lil' helper


Joined: 02 Dec 2003
Posts: 97

PostPosted: Mon Jan 17, 2005 7:29 pm    Post subject: Reply with quote

gondolin als ik het goed begrijp dan krijg ik dit resultaat als ik het ff simplistisch test :

echo "<TR><TD><font face=arial size=2>IP Address</TD><TD ALIGN=CENTER>192.168.123.220</TD><TD ALIGN=CENTER><font face=arial size=2>
" | sed -e "s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/brol/"
<TR><TD><font face=arial size=2>IP Address</TD><TD ALIGN=CENTER>brol</TD><TD ALIGN=CENTER><font face=arial size=2>

dus volgens mij werkt het met sed, niet ?
Back to top
View user's profile Send private message
gondolin
Apprentice
Apprentice


Joined: 09 Apr 2003
Posts: 158

PostPosted: Tue Jan 18, 2005 6:00 pm    Post subject: Reply with quote

ik gebruikte sed -n daarom blijkbaar.

Bedankt
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Dutch All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum