Question: I'm using the following code to format strings of text and put them inside `<div></div>` tags.

```
<?php

$errors  = '::This is line 1 ';
$errors .= '::This is line 2 ';

$errors = preg_replace('#::(.+?)\s*(?=::|$)#','<li>$1</li>',$errors);

echo ($errors);

?>

```

[Fiddle](https://eval.in/524310)

What this does is takes the `$errors` string, and turns it into `<li>This is line 1</li><li>This is line 2</li>` removing the `::` that's before each string, and trimming trailing spaces.

I'm trying to add `>>` to the beginning of each result, so it'll be `<li>>>This is line 1</li><li>>>This is line 2</li>`

One way I thought of is to add the `>>` in the second part of the `preg_replace`

`$errors = preg_replace('#::(.+?)\s*(?=::|$)#','<li>>>$1</li>',$errors);` 

which works, but is there a way to do it in the first part of the regex itself?

`'#::(.+?)\s*(?=::|$)#'`

I did try tweaking the `regex` in quite a few ways, but end up with all sorts of weird results.

Answer: 
Use a "ThisDeviceOnly" accessibility constant, ideally kSecAttrAccessibleWhenUnlockedThisDeviceOnly :

<https://developer.apple.com/library/ios/documentation/Security/Reference/keychainservices/#//apple_ref/doc/constant_group/Keychain_Item_Accessibility_Constants>
As long as data in not in app directory these data shall not be backed up, also there are flags which can be set in folder which shall not be backedup, try similar to below

[Can I add the Do not Back up for the "Document Directory" for iCloud](https://stackoverflow.com/questions/16316819/can-i-add-the-do-not-back-up-for-the-document-directory-for-icloud)

[iOS - Flag entire Document directory as do not backup](https://stackoverflow.com/questions/19964831/ios-flag-entire-document-directory-as-do-not-backup)