Extract Text using regex

Hey another question. I think it might be a regex issue more than a Easy Data Transform question. I’m trying to extract a text between brackets. I’m starting with :

154AD-1-A.png (https://dl.txxaast.com/.attachments/e904b5153b1e3d106f428c3deera5bdbf3/eb52dfe/154AD-1-A.png)

and would like to end with :
https://dl.txxaast.com/.attachments/e904b5153b1e3d106f428c3deera5bdbf3/eb52dfe/154AD-1-A.png

I’m actually using “Replace” with regex :
Replace = https://.*(.png|.jpg|.JPG)
With = /1 /2

Obviously this doesn’t work. Any ideas what I’m doing wrong and/or there is a simpler way to achieve this ?

Thanks in advance
Y.

Both those links are broken for me.

Can you just paste in as text:

  • some example input data
  • the desired ouput data for this input

Hey! Disregard the links just there for examples. I’d like to turn the text :
NAMEOFIMAGE.png(https://HOSTOFIMAGE.COM/FOLDER/SUBFOLDER/NAMEOFIMAGE.png)
into https://HOSTOFIMAGE.COM/FOLDER/SUBFOLDER/NAMEOFIMAGE.png

Basically the idea is to get rid of the “NAMEOFIMAGE.png” and get rid of the brackets. As the length of “NAMEOFIMAGE” vary I could not use the “Chop” function.
Cheers,
Y.

Ah never mind! Writing it gave me an idea.

  • I used “replace” : Suppressing the brackets, replacing .png by .png;
  • Used split col to separate everything by;
  • Used “remove cols” to suppress the columns I didn’t want.

Might not be the most elegant way. And I feel it could be achieved via regex but this works !

Ok, I think the forum mangled your text. But, for future reference, it sounds like you want to use regex to convert:

^.*\((.*)\)$

To:

\1

regex.transform (1.4 KB)

Nice! Definitely more elegant :slight_smile:

Dear Regex Master, I have an other request/question. Same kind of topic so I feel I should not create another one.

I’ve got these kind of columns
21. EXT. FOREST - DAY
22. INT. HOUSE - MORNING
24. INT. / EXT. CAR - NIGHT

I’d like to replace data to obtain three columns. First one with these values. This is separated by a coma but should be in column
21,22,24
then another column with
EXT,INT,INT/EXT
then another one with
FOREST,HOUSE,CAR
and a last one with
DAY,MORNING,NIGHT

I managed to extract the numbers using regex, [^(>) \d\d]* and replacing by nothing but I struggle with the rest.
Thanks in advance for any help,
Y.

It would probably be a lot simpler to:

  • Replace INT./EXT by INT/EXT
  • Use Split Col to split by ‘.’
  • Use Split Col to split by -
  • Remove Cols to remove unecessary cols
1 Like