Question: I have a class with a couple of methods.

Here is my function mapping:

```
    public void Connect(string SourceFile, OleDbConnection Connection, OleDbCommand Command) { zConnect(SourceFile, Connection, Command); }
    public void Tablenames2cmb(OleDbConnection Connection, ComboBox TargetComboBox) { zTablenames2cmb(Connection, TargetComboBox); }
    public void Tablenames2cmb(OleDbConnection Connection, string Exclusion, ComboBox TargetComboBox) { zTablenames2cmb(Connection, Exclusion, TargetComboBox); }
    public string GetUser(OleDbConnection Connection, OleDbCommand Command, OleDbDataReader Reader, string username) { zGetUser(Connection, Command, Reader, username); }

```

The first 3 methods compile just fine. But the string methods gives me an error that there is no return.

Method:

```
    private string zGetUser(OleDbConnection Connection, OleDbCommand Command, OleDbDataReader Reader, string username)
    {
        string result = "Foo";
        return result;
    }

```

I guess I made a stupid mistake with the function mapping, but I can't figure out what it is.

Answer: 
They are quite different. Yes, both affect how newlines are treated, but they switch behaviour for different concepts.

* `re.MULTILINE` affects where `^` and `$` *anchors* match.

Without the switch, `^` and `$` match only at the start and end, respectively, of the *whole text*. With the switch, they also match just before or after a newline:

```
>>> import re
>>> re.search('foo$', 'foo\nbar') is None  # no match
True
>>> re.search('foo$', 'foo\nbar', flags=re.MULTILINE)
<_sre.SRE_Match object; span=(0, 3), match='foo'>

```
* `re.DOTALL` affects what the `.` *pattern* can match.

Without the switch, `.` matches any character *except a newline*. With the switch, newlines are matched as well:

```
>>> re.search('foo.', 'foo\nbar') is None  # no match
True
>>> re.search('foo.', 'foo\nbar', flags=re.DOTALL)
<_sre.SRE_Match object; span=(0, 4), match='foo\n'>

```
It is not doing the same thing, `DOTALL` matches the newline character as well, while `MULTILINE` enables `^` and `$` to work on every line. 

Example:

```
The quick brown fox 
jumps over the lazy dog.

```

Here, `.+` would yield two results (the first and the second line) with no `DOTALL` mode. If `DOTALL` is turned on, it matches the whole phrase.

```
The quick brown fox 
jumps over the lazy dog.

```

Here, ie `^\w+` with `MULTILINE` mode on, will match twice as there's a *word character* at the start of **every** line.