[TxMt] Find: Ignore Whitespace

Hong Jiang ml at hjiang.net
Thu Mar 1 15:59:16 UTC 2007


If you want to search for the whole thing ignoring whitespaces and
newlines, you need to insert \s* between the words and symbols. For
example:
\s*}\s*elseif\s*(\s*$action\s*==\s*'update_product'\s*)\s*{\s*\$update_sql_data\s*=\s*
....

Make sure to escape regex symbols that occur in your string.


On 3/1/07, Richard Burford <richyburford at hotmail.com> wrote:
> Andy,
>
> Thanks for your reply. I have tried that and it doesn't work for me.
> Maybe I am doing it wrong.
>
> How would you use regex to ignore whitespace and newlines in this text?
>
>           } elseif ($action == 'update_product') {
>             $update_sql_data = array('products_last_modified' => 'now()');
>
>             $sql_data_array = array_merge($sql_data_array,
> $update_sql_data);
>
>             tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update',
> "products_id = '" . (int)$products_id . "'");
>           }
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>



More information about the textmate mailing list