|
Posted by Marco Tabini on 08/04/05 19:02
On 8/4/05 10:56 AM, "Sebastian" <sebastian@broadbandgaming.net> wrote:
> that works for my orginal request, but i found something else:
>
> $string = '[quote=xx]foo[/quote]\nmore text\r\n\r\n\r\n\r\nmore text';
>
Try removing double-instances of \r\n (or \n) before running the regex.
Marco
> now if they enter more carriage returns i get the results from above.
> its no big deal, but you always have someone trying to 'break' the system.
>
> thanks, i really need to learn some regexp.
>
> Marco Tabini wrote:
>
>> Try changing the
>>
>> \n*
>>
>> patterns to
>>
>> (?:\r?\n)*
>>
>> Cheers,
>>
>>
>> Marco
>>
>> --
>> BeebleX - The PHP Search Engine
>> http://beeblex.com
>>
>>
>> On 8/4/05 10:39 AM, "Sebastian" <sebastian@broadbandgaming.net> wrote:
>>
>>
>>
>>>>> [quote=user]
>>>>> foo
>>>>> [/quote]
>>>>>
>>>>> <bunch of extra lines>
>>>>>
>>>>> more text...
>>>>>
>>>>>
>>
>>
>>
>
Navigation:
[Reply to this message]
|