Regular Expression help

From: Date: Tue, 15 Apr 2003 21:37:20 +0000
Subject: Regular Expression help
Groups: php.general 
Request: Send a blank email to php-general+get-144028@lists.php.net to get a copy of this message
I am trying to match a line which starts with an alpha-numeric "word" followed by a pipe ( | ), however my regex's seem to be a bit off When I use the following... ^[A-Za-z_0-9]+\| It matches none of the lines. And when I remove the escape from the pipe, it matches everything in the world ( lines that start with #, lines that start with multiple words (seperated by spaces) then by a pipe, etc. examples of lines I don't want to match.. # ARIN WHOIS data and confirm the accuracy of the information provided Resource Type|Resource Name|Resource Handle|Parent Resource And an example of lines that I do want to match...... A|IANA-RSVD2|AS64512||64512|65535|IANA|Internet Assigned Numbers V4|RESERVED-1|NET-0-0-0-0-1||0.0.0.0|0.255.255.255|IANA|Internet Can anyone help shed some light on this?

« previous php.general (#144028) next »