Skip to main content
Inspiring
July 11, 2026
質問

regular expression question

Hello,

I have tried this :

, (\b.+\b)(\n|$)

 ($1),  

II have a little problem when there is a blank line after :

 

Before the change :

 

 

After the change :

 

 

In this example, after “accordéon” there is a blank line, and the result after change  is :

(accordéon),      so there is a comma and the blank line is removed.

 

But  I would like something like :

(accordéon)       without the comma and by keeping the blank line after

 

In that case, what regular expression I can use ?