[Phpmyadmin-devel] Fwd: regex-replace UI suggestion

Marc Delisle marc at infomarc.info
Sun Apr 10 21:55:05 CEST 2011


Le 2011-04-10 15:44, Karol Danko a écrit :
> Hi Mark, thank you for reply
> 
> I will use both POSIX (for WHERE) and PCRE for (match&replace)
> 
> The script will first select all rows matching WHERE fieldset
> after that it will loop the results and handle the replace via PHP
> (2nd fieldset MATCH and 3rd fieldset REPLACE)
> 
> (So to check all rows with PHP, the WHERE fieldset would be empty)
> 
> The problem however is the use of both POSIX and PCRE on the same page which
> may be confusing,
> but using only MySQL POSIX would make more complicated replaces impossible.
> On the other hand using only PHP's PCRE and looping all the results may be
> very inefficient on large result sets.

Indeed. About the interface, don't you think that introducing a new
syntax ($1 and #1) would be too confusing?

I think it would be better to offer a simpler syntax even if this means
having less functionality. Therefore you would keep the "standard" way
of using a backreference, a backslash followed by a digit.

> 
> On Sun, Apr 10, 2011 at 12:45 PM, Marc Delisle <marc at infomarc.info> wrote:
> 
>> Le 2011-04-10 05:35, Karol Danko a écrit :
>>> Hi everybody,
>>>
>>> (I used phpmyadmin-users mailing first but I did not receive any response
>> so
>>> sorry for double-post)
>>>
>>> I'm new to phpmyadmin development, so far I have been just passive daily
>>> user.
>>> I think phpmyadmin is great and I would love to help making it even
>> better.
>>>
>>> I'm working on regex-replace interface for phpmyadmin:
>>>
>> http://sourceforge.net/tracker/index.php?func=detail&aid=1398891&group_id=23067&atid=377411
>>>
>>>
>>> I would love to hear your thoughts about this concept I have, I suggest
>>> following UI:
>>> http://karoldanko.com/img/regex-replace.png
>>
>> Hi Karol,
>> I'll have suggestions about the interface but first a question.
>>
>> Looking at http://dev.mysql.com/doc/refman/5.5/en/regexp.html it seems
>> that MySQL REGEXP is based on POSIX extended regular expressions and not
>> PCRE (which supports back references).
>>
>>
>> --
>> Marc Delisle
>> http://infomarc.info


-- 
Marc Delisle
http://infomarc.info




More information about the Developers mailing list