Support is online

regular exression #62387

Resolved drees opened this topic Wednesday, 15 April 2020 · 4 replies
Author

I want to remove the text from a csv file after the - sign. This is no longer possible with the wildcart * in Find and replace. Is there a regular expression for this.
Is there also method to remove the text before the - sign.

7ATE9 - Niet meer leverbaar
Afzakker - Niet meer leverbaar
Agricola - Niet meer leverbaar
Agricola: De Lage Landen - Bordspel
Agricola: 2 Spelers Uitbreiding 1 - Niet meer leverbaar

Support

Hello,

I want to remove the text from a csv file after the - sign. This is no longer possible with the wildcart * in Find and replace. Is there a regular expression for this.

One thing is a bit confusing with the post. You are asking for regex to remove before or after - sign? The example in your post talks about before text of - sign so i have given regex for that.

Is there also method to remove the text before the - sign.

You can use the below regex to remove the text before - sign. See the screenshot attached for Multireplace rule.

/^([^-]+)-/
  • Screenshot 2020-04-15 at 2.01.25 PM.png

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

It is google translate.:D :D

I want before and after the "-". Before the "-" is the title and after the dash is the category. Via the rule copy I copy the text to a column category
The text for the "-" should be removed there.

Support

Hello,

I want before and after the "-". Before the "-" is the title and after the dash is the category. Via the rule copy I copy the text to a column category
The text for the "-" should be removed there.

Ok, the regex in my previous post was to remove text before -. You can use the below regex to remove text after -

/-.*$/

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

super thank you. I should have asked days earlier. Took me quite a few hours. Learned a lot.:D :D :D

Log in to reply to this topic.