# ext/filter, custom decimal separator, supports leading 0, regexp

- Thread: https://externals.io/message/22705
- Original archive: https://news-web.php.net/php.internals/22705
- Started by Pierre on 2006-04-10T13:11:28+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #22705 — Pierre — 2006-04-10T13:11:28+00:00

URL: https://externals.io/message/22705#22705

Hello,

Due to the success on my precedent post, I try again to get some
comments on my precedent patch and some new things I need in ext/filer.

This patch adds or changes the following things:

- regexp uses functions (ext/pcre)
  - 100% compatible with preg_* functions
  - Use of expression caches and other (faster)
  - Regexp tests now work

- rewrite the filter_float
  - support custom decimal separator. Let the developer decides which 
    separator to use, the default is not changed
  - slightly faster than the old implementation (and with the new
    features)

The patch:
http://pear.php.net/~pierre/filter_float_add_custom_seps_and_pcre.txt

Some examples:
http://pecl.php.net/~pierre/filter_float.phps

Any ideas or comments are welcome,

--Pierre

---

## #22706 — Antony Dovgal — 2006-04-10T13:31:52+00:00

URL: https://externals.io/message/22705#22706 · In reply to: #22705

+1

If we're going to make it the default way of handling user data, then 
it makes sense to implement it as flexible as possible, and regex stuff 
should be compatible with ext/pcre.


> Hello,
> 
> Due to the success on my precedent post, I try again to get some
> comments on my precedent patch and some new things I need in ext/filer.
> 
> This patch adds or changes the following things:
> 
> - regexp uses functions (ext/pcre)
>   - 100% compatible with preg_* functions
>   - Use of expression caches and other (faster)
>   - Regexp tests now work
> 
> - rewrite the filter_float
>   - support custom decimal separator. Let the developer decides which 
>     separator to use, the default is not changed
>   - slightly faster than the old implementation (and with the new
>     features)
> 
> The patch:
> http://pear.php.net/~pierre/filter_float_add_custom_seps_and_pcre.txt
> 
> Some examples:
> http://pecl.php.net/~pierre/filter_float.phps
> 
> Any ideas or comments are welcome,
> 
> --Pierre
> 


-- 
Wbr, 
Antony Dovgal

---

## #22707 — Andrei Zmievski — 2006-04-10T16:28:02+00:00

URL: https://externals.io/message/22705#22707 · In reply to: #22706

I'll have to review it.

-Andrei




> +1
>
> If we're going to make it the default way of handling user data,  
> then it makes sense to implement it as flexible as possible, and  
> regex stuff should be compatible with ext/pcre.
>
> 
> > […]
>
>
> -- 
> Wbr, Antony Dovgal

---

## #22713 — Pierre — 2006-04-11T15:31:21+00:00

URL: https://externals.io/message/22705#22713 · In reply to: #22707

On Mon, 10 Apr 2006 09:28:02 -0700
andrei@gravitonic.com (Andrei Zmievski) wrote:

> I'll have to review it.

For the record, the pcre part of the patch has been commited by Derick.

--Pierre
