Regular expression to find word at the beginning of each line and read entire line.

Regular expression to find word at the beginning of each line and read entire line.

Post by malauddi » Mon, 17 Oct 2005 04:01:36


Hi all,

I am looking for a regular expression to find a word at the beginning
of a line and then read the entire line. From the example below, I want
to find the word "FN" and then read entire line "FN:Robert Henry".

------------------
BEGIN:VCARD
FN:Robert Henry
EMAIL;WORK;PREF:mycompany.com
TEL;WORK:office
------------------

Many thanks in advance.

- Haps
 
 
 

Regular expression to find word at the beginning of each line and read entire line.

Post by Jon Shemit » Mon, 17 Oct 2005 07:21:47


^fn\b.*

be sure to set the ignorecase and multiline options.

--

i'm midnightbeach.com and a mtn bike accident
means i'm left handed until the end of october,
so please pardon lower case and terseness.

 
 
 

Regular expression to find word at the beginning of each line and read entire line.

Post by malauddi » Mon, 17 Oct 2005 12:51:31

Thanks Jon.