Jump to content

Trying to Create a Bullet Cleaner Action


Recommended Posts

Posted

I want to create a series of Text Actions for the clipboard. The regex is roughly: ^\s*(•|·|▪|●|♦|-|–|−|¬|¬)\s+

 

I have created a Universal Action - I can't see if my failure is the Regex or getting the result back to the Clipboard.

CleanShot2024-12-11at21_15.12@2x.thumb.png.5e76e50487dd274ac15cfb086f1bc87e.png

 

CleanShot2024-12-11at21_15.34@2x.thumb.png.52c2ca6cee90ee5515b970d26d038d1d.png

 

How do I debug?

 

Posted (edited)

Thanks - fixed the String vs Regex. Something still isn't working. Now the Replace dialog looks like:

CleanShot2024-12-13at17_49.58@2x.thumb.png.69a66267be8c8825f3c013c02e0a3594.png

When I run it against this text: 

Burnout exhibits three dimensions: Exhaustion; Lack of Productivity; Cynicism

    Burnout is caused by chronic unrelenting stress. Stress that comes from feeling that there is no end in sight Cynisim becomes the easy way out when we don't have the mental resources to cope.

6 Factors that lead to burnout
- Workload - is the volume of work we have sustainable - ties into the Agile Manifesto and Sustainable pace
- Lack of Control - ties into [[Autonomy]] (i.e. ability to shape the projects we work on) . Having multiple bosses or multiple sources of work reduces control.
- Insufficient Reward - Underpaid, lack of recognition the **Status** portion of the [[SCARF]] model
- Community - are you connected with the people at work and outside of work - the **Relatedness** portion of both [[SCARF]] and [[ARC]]
- Fairness - are you treated fairly
- Values - are your personal values in alignment with the ones at work
 

I would expect it to remove the the first "-" and leave the rest of the text intact.

 

The results I see in the Debugger window seem to suggest that my Regex isn't doing anything. Regex continues to confuse me after nearly 40yrs of use.

Edited by mlevison
Posted (edited)

image.thumb.png.9aa413ab4150f6dfdd09acf77bc86983.png

 

^\s*[•·▪●♦\-–−¬¬]\s+

 

This one should work. Don't forget to check the Multi-line option! 

 

Edit: 

To catch more bullet options (esp. + and *, which are common in Markdown)

 

^\s*[•·●○◦⭘∘∙⋅▪■□◆♦◇▫▹▸\-–—−―‒⁃▬▭▯►➢➤➣→⇒▶▷※⁂☆★✓✗❖◈⬧*+]\s+

Edited by zeitlings
Posted

@zeitlings Nice that did the trick

@Stephen_Cthanks - I tried to use one. There are two challenges - the small - proving the site is using the same flavour of regex as your tool. The bigger one - you can tell when your regex doesn't work. It doesn't tell you why it didn't work. Ideally there would a regex generator. I feed it an input/result state and it generates the regex.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...