Question: I'm developing an app using Apache Cordova for Visual Studio. The purpose of this app is to take a picture using the phone and upload this picture alongside with some other user input data to our company's webpage, that uses a SQL-server Database to store it's data. 

So, the question is: How can I insert data to this database so I can show it on the webpage, considering that the app will be used outside of our network? So it can't be a local connection to our database!

Answer: 
If you use `\A` instead of anchor `^` then it will fail the match:

```
# finds no match
grep -Pz -- '\A<\?xml.*\?>' file

```

This `grep` in a multiline string `^` matches at the start of every line but `\A` matches at the real start of input.
You can join the lines to a big line by `xargs` before applying the regex:

```
# no match returns
cat test.txt | xargs | grep '^<?xml.*?>'

```

[Check for more usage on `xargs`](http://tecadmin.net/xargs-command-in-linux-with-example/#)