On 4/15/07 Bruce P. Morin wrote:
>I am trying to find this: $msg .= "Sender's Name: \t
>$_POST[name]\n";
>
>and replace it with this:
>
>$msg .= "Sender's First Name: \t$_POST[first_name]\n";
>$msg .= "Sender's Middle Initial: \t$_POST
>[middle_initial]\n";
>$msg .= "Sender's Last Name: \t$_POST[last_name]\n";
>$msg .= "Sender's Suffix: \t$_POST[suffix]\n";
>
>Just trying to find the line is impossible in a document that I
>copied it from. What settings do I need to have so that it can find it?
This isn't really a settings issue. What search pattern have you tried?
Possibly due to email line-wrapping, what you're trying to find isn't
totally clear, but I think it's this:
$msg .= "Sender's Name: \t$_POST[name]\n";
on one line in the file. Yes?
As a method, start by selecting a line you want to find, and then use
the menu command Search->Enter Search String. Then open the Find dialog
and look at the search pattern (make sure Use Grep is selected in the
Find dialogue before doing this). I get this:
\$msg \.= "Sender's Name: \\t\$_POST\[name\]\\n";\r
The added backslashes ('\') are there to escape characters that might
have special meanings as part of search pattern. The '\r' at the end is
the character BBEdit uses to represent line endings in documents it
opens (doesn't change the character used in the written file).
Now, this pattern might have to be generalized a bit. For example,
perhaps the lines you are searching for don't always have the same
number of spaces in the middle, or maybe some lines are indented.
If so, you might try searching with this pattern:
^[ \t]*\$msg \.= "Sender's Name: +\\t\$_POST\[name\]\\n";\r
- the '^' indicates the start of the string segment being tested for a
match;
- the '[ \t]* is the pattern for zero or more spaces or tabs at the
start of the string;
- the ' +' after 'Name:' is the pattern for one or more spacebar spaces.
You could generalize further, but I'll stop there.
Does this help? If not, ask again with more specifics.
- Bruce
__bruce__van_allen__santa_cruz__ca__
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>