Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In LibreOffice Calc how can I use Regular Expressions to find and replace every character after a pattern, and remove the pattern itself.

Example:

  • 123_2015970_etgn.jpg
  • 124_2015971_etgn.png
  • 125_2015972_etgn.JPG

Expected result after Find & Replace (remove _etgn and everything after that pattern)

  • 123_2015970
  • 124_2015971
  • 125_2015972
share|improve this question
up vote 3 down vote accepted

Try replace _etgn.* with nothing using regular expressions.

Edit Now tested as working - note full stop is required.

SU599242 example

share|improve this answer
    
Would the period (.) need to be escaped in order to find it as a literal? (I'm not at all familiar with LibreOffice). – chuff May 23 '13 at 22:41
    
Works great, thanks! – Edgar May 23 '13 at 23:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .