Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.