Download the PHP package sl5net/preg-contentfinder without Composer

On this page you can find all versions of the php package sl5net/preg-contentfinder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package preg-contentfinder

PregContentFinder

A powerful and robust PHP library for finding, extracting, and transforming content within text based on regular expression (PCRE) delimiters, featuring advanced support for nested structures, custom callback processing, and intelligent delimiter handling.

Latest Stable Version Total Downloads License

A Legacy of Stability: The fundamental recursive parsing logic and the intelligent handling of delimiter conflicts have been stable and functional since its early years (around 2002-2003, likely PHP 4). Subsequent updates primarily focused on adapting to new PHP versions (like PHP 5.6). This latest modernization brings the proven core engine to PHP 8.1+, integrating it with Composer and modern PHP standards.

It excels where simple string functions or basic regex fall short, particularly with nested structures and context-dependent transformations.

Key Features

Why PregContentFinder?

Use this library when you need to:

Its unique combination of features, especially the robust handling of nested structures and internal management of delimiter conflicts, makes it a powerful tool for complex text processing tasks.

Installation

The recommended way to install PregContentFinder is via Composer:

Basic Usage

Advanced Examples

1. Transforming Nested Structures (Simple Replacement)

Input:

Goal: Change { to [ and } to ].

PHP Code:

(The simple { to [ example is a bit tricky to show concisely without knowing the exact callback logic used to produce that specific output. The power is that the callback can do this.)

2. Code Indentation / Pretty-Printing (Conceptual)

Input:

Goal: Indent based on nesting.

PHP (Conceptual Callback Logic):

Use Cases

PregContentFinder is well-suited for:

Development Workflow & Management Script

For a streamlined development workflow, including building Docker images for different PHP versions, running tests, and managing Docker resources, a dedicated helper script is available.

This script automates common tasks and helps in maintaining a clean Docker environment.

You can find this management script in the SL5_some_favorite_scripts repository:

➡️ PCF Management Script ⬅️ (Link directly to the script file)

Or browse the directory containing other useful shell scripts: ➡️ SL5 Favorite Shell Scripts (Link to the sh directory)

Key features of the script:

It's recommended to place this script outside the SL5_preg_contentFinder project directory and call it using a relative path or a shell alias/function as described in its help output.

License

PregContentFinder is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). See the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues. (Consider adding a CONTRIBUTING.md file if you have specific guidelines).


All versions of preg-contentfinder with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2 || ^8.3
psr/log Version ^1.1 || ^2.0 || ^3.0
monolog/monolog Version ^3.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sl5net/preg-contentfinder contains the following files

Loading the files please wait ....