mb_regex_set_options

(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)

mb_regex_set_optionsSet/Get the default options for mbregex functions

Beschreibung

mb_regex_set_options(?string $options = null): string

Sets the default options described by options for multibyte regex functions.

Parameter-Liste

options

The options to set. This is a string where each character is an option. To set a mode, the mode character must be the last one set, however there can only be set one mode but multiple options.

Regex options
Option Meaning
i Ambiguity match on
x Enables extended pattern form
m '.' matches with newlines
s '^' -> '\A', '$' -> '\Z'
p Same as both the m and s options
l Finds longest matches
n Ignores empty matches
e eval() resulting code
Regex syntax modes
Mode Meaning
j Java (Sun java.util.regex)
u GNU regex
g grep
c Emacs
r Ruby
z Perl
b POSIX Basic regex
d POSIX Extended regex

Rückgabewerte

The previous options. If options is omitted or null, it returns the string that describes the current options.

Changelog

Version Beschreibung
8.0.0 If the parameter options is given and not null, the previous options are returned. Formerly, the current options have been returned.
8.0.0 options is nullable now.

Siehe auch

  • mb_split() - Split multibyte string using regular expression
  • mb_ereg() - Regular expression match with multibyte support
  • mb_eregi() - Regular expression match ignoring case with multibyte support

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

Löschen nach einen gewissen Datum in einer TXT-Datenbank

Sieh dir diese Zeile mal genau an: if (substr($line, 0, 62) == "" AND substr(trim($line), 62) > $num) Wie können die ersten 62 Zeichen nichts se ...

Geschrieben von scatello am 13.11.2025 13:32:14
Forum: Off-Topic Diskussionen
Was würdet ihr euch von einem Web-Framework wünschen?

Hallo! Ich bin selbst kein PHP-Spezialist, sondern entwickle Dev-Tools (Open Source). Ich bin gerade dabei, ein Web-Framework der nächsten Gener ...

Geschrieben von Mondegreen am 13.11.2025 09:13:47
Forum: PHP Developer Forum
Löschen nach einen gewissen Datum in einer TXT-Datenbank

Sorry, das muss so sein: $datenbank = "anzeigen.php"; Die Datei kann auch mit Endung "db" oder "inc" enden. $num ist der Datensatz, neuer Datensa ...

Geschrieben von maiky am 13.11.2025 08:29:19
Forum: Off-Topic Diskussionen
Datumausgabe *HEUL*

Um das Datum in deinem Gästebuch von yyyy-mm-dd in das Format dd.mm.yyyy zu ändern, kannst du die DateTime-Klasse verwenden, um das Datum entspr ...

Geschrieben von thomast am 13.11.2025 04:32:06
Forum: SQL / Datenbanken