score:1
Accepted answer
you can't do this with a single search-replace!
the only way is to use two search-replace:
- the first with the punct-space
match: ^(\s*)(//)?(.*?)"([\p{punct}\p{space}]++)(\p{alnum}.*?\p{alnum})([\p{punct}\p{space}]*)?"(.*?)$
replace: $1$3"$4" \+ i18n.tr\("$5"\) \+ "$6"$7
- second without the punct-space
match: ^(\s*)(//)?(.*?)"(\p{alnum}.*?\p{alnum})([\p{punct}\p{space}]*)?"(.*?)$
replace: $1$3i18n.tr\("$4"\) \+ "$5"$6
don't forget to do a backup before any tries
Source: stackoverflow.com
Related Query
- Adding characters conditionally to a regular expression match
- regular expression to match all java imports except one with a certain ending
- Regular expression to match not the beginning/end of a line
- Replacing just the match of regular expression in Eclipse find and replace
- Eclipse, regular expression search and replace
- Convert Java stream to regular for loop expression in Eclipse IDE
- Regular expression to find <% but exclude <%@?
- File system regular expression search tool
- Eclipse File Search Dialog - Regular Expression for Group Unions and Negation
- Regular expression in eclipse
- Eclipse IDE, regular expression search and replace
- Regex To match string starting and ending with characters
- Regular Exp. in Eclipse, Find and Replace: Match everything between curly braces
- What is the regular Expression to uncomment a block of Perl code in Eclipse?
- Exclude folder except one subfolder via regular expression in Eclipse
- How to find a regular expression pattern without include it in the result?
- Regular expression in eclipse
- Searching in eclipse using Regular expression
- regular expression to replace '<?' by '<?php'
- Regular Expression to find bad words in code comments
- Searching for a regular expression in Eclipse (finding all links without an onclick attribute)
- eclipse file name pattern search with regular expression
- How to search with a regular expression in Eclipse?
- Eclipse file search regular expression operation
- Regular expression is working online and not in Eclipse
- regular expression to detect a tag
- How to define a contentType of file association in Eclipse using a regular Expression
- Eclipse e4 - adding a Core Expression
- Eclipse Find Regular Expression
- Basic regular expression using eclipse
More Query from same tag
- How to build call graph using JDT
- Changes to android widget not loading
- How can I get the Eclipse console to print messages from a DLL?
- Eclipse plugin for generating UML diagram from c++ code
- @BeforeAll not working in SOME files in Eclipse
- slow eclipse remote debugging connection
- nested exception is java.sql.SQLTransactionRollbackException: At least one parameter to the current statement is uninitialized
- Unable to edit AppManifest.xml?
- Why can Eclipse not "see" the structure of a class?
- debugging a node application with eclipse
- Java IO user.dir Eclipse
- Can't import bare git project into eclipse via ssh
- Prevent code execution in Eclipse Graphic Layout preview
- How to use trunk, branches, tags in svn from eclipse?
- Looking for Java EE Version installed with Eclipse
- how to edit eclipse.ini file from command prompt - ubuntu
- Unresponsive Eclipse preferences (And other dialogs) on Linux
- Eclipse can't find class DefaultSolver of OptaPlanner and throws ClassNotFoundException
- Mylyn refuses to work
- How to remove RCP view icon?
- GridView Item listing in Vertical Order
- How to import a project to eclipse using jcraft ftp plugin
- Why doesn't Eclipse add @Override annotations in "Generate Delegate Methods" refactoring?
- Drawable Resource cannot parse selector tag in XML
- Eclipse change color of vertical white line
- ANDROID : java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.encodeBase64String in android
- Debugging an eclipse / maven project on a remote server?
- Unreachable error
- Interesting Eclipse JavaDoc commenter error
- How do you debug a series of Aspect in eclipse?