正则表达式匹配每个字符和换行符

I want to filter some data using regex. As for now I have some text going over 2 lines and I tried to make the linebreak match with [^.*]. But it seems to not pass the newline and so it doesn't match any result on the second line. How can I include the linebreak? I tried something like [^ .*] but it didn't worked out.

Description

You could use the 's' option which forces the dot to match all new line characters, or if you don't have control over the underlying code you could try:

([^.]|[.])

This will match every character. The dot will sometimes not match the carriage return, new line.

PHP example

<?php
$sourcestring="This is my.
super cool
test string";
preg_match_all('/([^.]|[.])/i',$sourcestring,$matches);
echo "<pre>".print_r($matches,true);
?>

$matches Array:
(
    [0] => Array
        (
            [0] => T
            [1] => h
            [2] => i
            [3] => s
            [4] =>  
            [5] => i
            [6] => s
            [7] =>  
            [8] => m
            [9] => y
            [10] => .
            [11] => 
            [12] => 

            [13] => s
            [14] => u
            [15] => p
            [16] => e
            [17] => r
            [18] =>  
            [19] => c
            [20] => o
            [21] => o
            [22] => l
            [23] => 
            [24] => 

            [25] => t
            [26] => e
            [27] => s
            [28] => t
            [29] =>  
            [30] => s
            [31] => t
            [32] => r
            [33] => i
            [34] => n
            [35] => g
        )

    [1] => Array
        (
            [0] => T
            [1] => h
            [2] => i
            [3] => s
            [4] =>  
            [5] => i
            [6] => s
            [7] =>  
            [8] => m
            [9] => y
            [10] => .
            [11] => 
            [12] => 

            [13] => s
            [14] => u
            [15] => p
            [16] => e
            [17] => r
            [18] =>  
            [19] => c
            [20] => o
            [21] => o
            [22] => l
            [23] => 
            [24] => 

            [25] => t
            [26] => e
            [27] => s
            [28] => t
            [29] =>  
            [30] => s
            [31] => t
            [32] => r
            [33] => i
            [34] => n
            [35] => g
        )

)