Extracting Embedded Link

Hi,

I am trying to extract the links and passcode from this segment of text.

I want to copy the whole section in on action, however, I am not copying the link embedded in "here", how do I do that?

Wednesday, Aug 26

10:00-12:00: Class
Access zoom here, use passcode 123456

12:00-14:00: Exercise session

Group work

Access zoom here, use passcode 123456

You can try search regex action’

  • For passcode assuming all numbers try , notice the space (I’ve assumed there is no colon) Passcode (\d+)

  • Generally, meeting invite come in below format, If that is the case the link can be extracted with the regex
    Zoom Meeting\n([\w:/?=.]+) or
    Zoom Meeting\n(.*)<---- THIS is lazy way of matching everything and not advisable.

TAB India is inviting you to a scheduled Zoom meeting.

Topic: Managing Issues and Communication

Join Zoom Meeting
https://us02web.zoom.us/j/85196215577?pwd=d2Vnb2pVZTNnRFRtNmpyaWFJdDYzdz09

Meeting ID: 851 9621 5577
Passcode: 864964

@prashant the issues is not finding the key with regex, it is copying the information.

Currently when I copy text I do not copy the embedded link, this is issue I need to fix :smiley:

Can you tell from where you are copying the information ? Maybe a screenshot or the file itself.

Maybe you need an action which copies the information as TEXT or Markdown ,rather than rich text ?

Would this work for you?

image

We really need the URL of the actual web page where this text is shown, but here is an example to help get you started.

You need to hover the mouse over the target link, and trigger the macro.
It will get the link text and href, and the surrounding text.

Example Output

Below is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.

Please let us know if it meets your needs.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MACRO:   Extract Link href, text, and Parent Text from Hover [Example]

-~~~ VER: 1.0    2020-08-27 ~~~
Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

DOWNLOAD Macro File:

Extract Link href- text- and Parent Text from Hover [Example].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.


ReleaseNotes

Macro Author: @JMichaelTX

This is just an example written in response to the below KM Forum Topic. You will need to use as an example and/or change to meet your workflow automation needs.

MACRO SETUP

  • Carefully review the Release Notes and the Macro Actions
    • Make sure you understand what the Macro will do.
    • You are responsible for running the Macro, not me.

==USE AT YOUR OWN RISK==

  • While I have given this a modest amount of testing, and to the best of my knowledge will do no harm, I cannot guarantee it.
  • If you have any doubts or questions:
    • Ask first
    • Turn on the KM Debugger from the KM Status Menu, and step through the macro, making sure you understand what it is doing with each Action.
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Topic Title: Extracting embedded link

URL: Extracting Embedded Link

Post Date: 2020-08-26
Posted By: JensBay

1 Like

All data is below, I have yet to try your method @JMichaelTX

Wednesday, Aug 26
10:00-12:00: Navcom Radio
Host: Baki Cakici
Co-host: Jessamy Perriam
Access zoom here, use passcode 604949

12:00-14:00: Exercise session
Group work
Access zoom here, use passcode 515145

Thanks, but that is NOT the same as the source web page.
It may have the same data, but he underlying HTML will be different.
At a minimum, we need the HTML code, posted in a Forum Code Block, of the block of HTML around the target text. Best to go at least two <div> levels above the target text.

I've done my best, although I couldn't figure out how to use the macro linked. Hope the text file within works :crossed_fingers:

Keyboard test.zip (2.2 KB)

It is really simple:
Type three back quotes and "html", and return
paste the HTML Code and return
type another three back quotes

image

Thanks for the text file. But next time just use a plain text file, NOT RTF.

So the first macro I provided you was very close.
It only took a minor mod to work in general.

Note that for EACH LINK you will need to repeat this process:

  1. Hover over the link
  2. Trigger this macro.

Example Output

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Below is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.

Please let us know if it meets your needs.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MACRO:   Extract Link href, text, and Parent Text from Hover [Example]

-~~~ VER: 1.1    2020-09-01 ~~~
Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

DOWNLOAD Macro File:

Extract Link href- text- and Parent Text from Hover [Example].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.


ReleaseNotes

Macro Author: @JMichaelTX

This is just an example written in response to the below KM Forum Topic. You will need to use as an example and/or change to meet your workflow automation needs.

MACRO SETUP

  • Carefully review the Release Notes and the Macro Actions
    • Make sure you understand what the Macro will do.
    • You are responsible for running the Macro, not me.

==USE AT YOUR OWN RISK==

  • While I have given this a modest amount of testing, and to the best of my knowledge will do no harm, I cannot guarantee it.
  • If you have any doubts or questions:
    • Ask first
    • Turn on the KM Debugger from the KM Status Menu, and step through the macro, making sure you understand what it is doing with each Action.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Topic Title: Extracting embedded link

URL: Extracting Embedded Link

Post Date: 2020-08-26
Posted By: JensBay

1 Like

Thank you very much @JMichaelTX!

It meets the need, but perfection is always the enemy of good enough, and I think this certainly is good enough!

Thanks again!

1 Like