haskell regex substitution

后端 未结 3 980
我寻月下人不归
我寻月下人不归 2020-12-15 16:38

Despite the ridiculously large number of regex matching engines for Haskell, the only one I can find that will substitute is Text.Regex, which

3条回答
  •  庸人自扰
    2020-12-15 17:35

    The regular expression API in regex-base is generic to the container of characters to match. Doing some kind of splicing generically to implements substitution would be very hard to make efficient. I did not want to provide a crappy generic routine.

    Writing a small function to do the substitution exactly how you want is just a better idea, and it can be written to match your container.

提交回复
热议问题