How to replace pairs tags with regexp

Antonio Corbi via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jul 21 01:53:36 PDT 2017


On Friday, 21 July 2017 at 07:42:28 UTC, Suliman wrote:
> On Friday, 21 July 2017 at 07:30:07 UTC, Antonio Corbi wrote:
>> On Friday, 21 July 2017 at 07:08:34 UTC, Suliman wrote:
>>> On Friday, 21 July 2017 at 06:19:43 UTC, Suliman wrote:
>>>> There reason of issue above is spaces before "#".
>>>
>>> What wrong with next regex https://dpaste.dzfl.pl/024a47ed2a56
>>>
>>> I expect that it will select:
>>>
>>> #Header
>>> my header text
>>>
>>> ##SubHeader
>>> my sub header text
>>>
>>> Because: ^#{3}
>>
>> Have you tried https://regex101.com/
>>
>> It gives you results and explanations about your regex in 
>> realtime.
>>
>> A. Corbi
>
> I tried. But I am getting different behavior in online editor 
> and in the code.

Could it be related to the regex's 'flavor' you are using?

A. Corbi


More information about the Digitalmars-d-learn mailing list