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

M

malauddin

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".
 
J

Jon Shemitz

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:blush:ffice
------------------

^fn\b.*

be sure to set the ignorecase and multiline options.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top