Thanks for answering - if I am getting this right this is actually pretty
straightforward and it seems to be only a business concerning the
escaping/unescaping of some characters '|(){}?+' if I am getting this
right, so far it's working.



On Fri, Jun 18, 2021 at 11:02 PM Kurtis Rader <kra...@skepticism.us> wrote:

> On Fri, Jun 18, 2021 at 2:34 PM Pietro <pietro.paol...@cognitivecredit.com>
> wrote:
>
>> I am trying to solve the problem of automatically translating a raft of
>> regexes which were originally intended for GNU sed but that I'd like to run
>> using GoLang, if feasible.
>>
>> I could not find any syntax options/settings for the regex package which
>> I am assuming is quite strict in its syntax, PCRE or GNULib have options
>> that can change some parts of the syntax.
>>
>
> See https://golang.org/pkg/regexp/#CompilePOSIX and
> https://github.com/google/re2/wiki/Syntax. If your sed expressions are in
> BRE form it's straightforward to translate them to ERE form. It would not
> surprise me if someone has already written a tool to translate BRE/ERE
> syntax to Go's RE2 syntax but I'm not aware of any such tool.
>
> --
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAD1wxRJzsHKbDSb9nadvz9VR-bvvUjUk8oE_OMEuuM0sjA6U5g%40mail.gmail.com.

Reply via email to