|
Posted by Mumia W. on 08/15/06 11:05
On 08/15/2006 04:15 AM, FFMG wrote:
> Mumia W. wrote:
>> On 08/15/2006 02:17 AM, FFMG wrote:
>>
>> Perhaps use, /a{0,10}1\b/
>>
>> The "\b" indicates a word boundary.
>>
>
> Sorry that will not work, for example,
>
> preg_replace( "/(a){0,10}(10)\b/", "######", "Aaaaa10B" )
>
> Does not work as 'B' is seen as part of the word.
> I need to tell regex that my word boundary is anything other than a
> digit, ([^0-9])
>
> FFMG
>
Darnit! You're right. Try this:
/(a){0,10}(10)(?:[^\d])/
Navigation:
[Reply to this message]
|