Column Row edit / change character - delete "../"

Hi;
I searched, but I couldn’t find the solution I wanted. As you can see, I want to delete or remove this field “…/” at the beginning of the link (change it by adding another word).

How do I do this with a workflow and node. For example, it would be much more useful for me.
image

The solution is as follows. As an example I will share the work of novices like me;)

Hi,

You could also use regexReplace($href$, "^../", "")
I think this one is a more reliable solution because the “replace” function will replace all the matches but with the "regexReplace " function you can replace the one at the beginning.

Best,
Armin

1 Like

thanks for this answer, i will have a question, how should i write a line with a value of “… n …” to completely delete it?

I use the string “something” instead of “n” that you used:
If you have a single line string: “.*something.*
If you have multiple lines and want to delete the line which includes the string: “.*something.*\n
If you have multiple lines and want to delete whole text if it contains any of this string: “(.*\n)*.*something.*(.*\n?)*

Best,
Armin

I’m sorry, but I don’t understand.
for example; if I want to clear all rows containing “Y” in column x. how to write as command.

I have edited the last regex.

regexReplace($X$, "(.*\n)*.*Y.*(.*\n?)*", "")

This will work for multi line string as well and will delete the string or you can replace it with some other text.
If you want to filter the entire row which has “Y” in its X column, you can use the the same regex I provided ((.*\n)*.*Y.*(.*\n?)*) in Row Filter node and check the “Regular Expression” option.

Best,
Armin

it works, but I can’t do exactly what I want. I want to delete / delete the lines marked in yellow below. This is exactly the solution I want to achieve :frowning:

Again I’m sorry because I have improved the expression a bit more to work in all cases.

What you want is to filter the rows based on regex.

So as I said, use a Row filter node and choose for example column X and use the regex I provided:
(.*\n)*.*Y.*(.*\n?)*
as the pattern matching value and check the option for regular expression.

Best,
Armin

1 Like

I tried but not. Is there something wrong?

image

image

Use backslash “\” to escape special characters like . and ?
(.*\n)*.*http://www\.marchespublics\.gov\.tn/onmp\?.*(.*\n?)*

Best,
Armin

1 Like

was now :slight_smile: was super, thank you very much for your interest and help. Thanks to you

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.