Analysis to give me text value between 2 other text string values

(imported topic written by tgxwtso91)

I have this code which gives me text that comes after other specified text critera…

if exists file (“C:\notes\notes.ini”) then following texts of firsts “CN=” of lines whose (it contains “Location=Office (Network),”) of file (“C:\notes\notes.ini”) else “n/a”

the result is “John Doe/O=BCBSRI”

I would like just the “John Doe” to come back… in other words drop the “/O=BCBSRI”

(imported comment written by tgxwtso91)

Nevermind got it…

if exists file (“C:\notes\notes.ini”) then following text of first “CN=” of preceding text of last “/” of lines whose (it contains “Location=Office (Network),”) of file (“C:\notes\notes.ini”) else “n/a”