# Regular-expressions

## Used Expressions

### New Line

matches any Unicode newline sequence; can be modified using verbs

```php
$string = preg_replace('/\R/u', '[,nL]', $string); // Probleme mit Umlauten
$string = preg_replace("/\r|\n/s", '[,nL]', $string);
```

## Tools

* [grex](https://github.com/pemistahl/grex)

## Links

* [regex101](https://regex101.com/) for testing
* [phprex](https://phphub.net/regex/) for testing and visualizing
* [iHateRegex](https://ihateregex.io/)
* [Learn Regex the easy way](https://github.com/ziishaned/learn-regex/blob/master/translations/README-de.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notes.d15r.de/dev/regular-expressions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
