Skip to content

Language Archiving Technology

Sections
Personal tools
You are here: Home » Tools » Elan » ELAN Forum » Regular expression replace?

Regular expression replace?

Up one level

Regular expression replace?

Posted by BrenBarn at 2011-04-22 04:29  

Does ELAN have a facility for regular expressions in replacement expressions? I see there is a pretty full-featured regex engine for searches, but the only replace option I see doesn't appear to accept anything but literal text. In particular, it doesn't accept group references. This seems to make the search-and-replace function extremely limited. Am I missing some other way to do more complex replacements?

Thanks.

Re: Regular expression replace?

Posted by hasloe at 2011-04-26 10:15  

No, currently there is no support for regular expressions in replacement expressions, the replacement is indeed treated as a literal string. In the current situation the replace function only receives the "hits" and the hit positions, it has no (group) references to the regular expression of the search (which will make constructing a regular expression for a replacement difficult, I believe).

-Han

 

Powered by Plone

This site conforms to the following standards: