Dear Statasticians,
I'm trying to match a pattern in a plain text file containing line breaks, e.g. from...
Authors
Mueller A. Candrian G. Kropotov JD. Ponomarev VA. Baschera GM.
Authors Full Name
Mueller, Andreas. Candrian, Gian. Kropotov, Juri D. Ponomarev, Valery A.
... I'm trying to extract the authors, i.e. the second line of the text. The word "Authors" is followed by a line break, then two blanks (which you probably can't see because they've been stripped off by the forum software) , then come the authors, and the line ends with another line break.
I've tried to match this using
but it returns an empty string.
How can I match the CR/LF character? I've searched far and wide, but there doesn't seem to be any dedicated regex symbol in Stata?
Alex
Equipment: Mac OS 10.10, Stata 13
I'm trying to match a pattern in a plain text file containing line breaks, e.g. from...
Authors
Mueller A. Candrian G. Kropotov JD. Ponomarev VA. Baschera GM.
Authors Full Name
Mueller, Andreas. Candrian, Gian. Kropotov, Juri D. Ponomarev, Valery A.
... I'm trying to extract the authors, i.e. the second line of the text. The word "Authors" is followed by a line break, then two blanks (which you probably can't see because they've been stripped off by the forum software) , then come the authors, and the line ends with another line break.
I've tried to match this using
Code:
loc rgx (Authors[^!-~] )(.*)([^!-~]) replace authors = regexs(2) if regexm(abstract, "`rgx'")
How can I match the CR/LF character? I've searched far and wide, but there doesn't seem to be any dedicated regex symbol in Stata?
Alex
Equipment: Mac OS 10.10, Stata 13
Comment