ereg_replace Help
| From: | lists at mhess dot qn dot net | Date: | Thu, 21 Mar 2002 18:03:25 +0000 |
| Subject: | ereg_replace Help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-89571@lists.php.net to get a copy of this message | ||
Hi all,
I have a large file that I am trying to parse.
I have a many lines that look like this
\\text1
I need an expression that will change \\text1 to text1=
so if I have something like this
\\text1
asdfkjaslkfj
asdlfkjasljkf
asdlkfjasldfkj
asldkfjalskfj
\\text2
erweiurwoeir
werqwer
qwer
qwerqw
er
\\text3
asdlfkw
xcvsdf
zxcvcgn
sdfgwr
xcdfvszdfg
it will become
text1 = "
asdfkjaslkfj
asdlfkjasljkf
asdlkfjasldfkj
asldkfjalskfj
" text2 = erweiurwoeir
werqwer
qwer
qwerqw
er
" text3 = "asdlfkw
xcvsdf
zxcvcgn
sdfgwr
xcdfvszdfg
"
Any Ideas,
Michael