patil-ashutosh / go-regex-utility

A curated list of golang applications using regex
MIT License
3 stars 8 forks source link

Remove all line breaks from a string #17

Open patil-ashutosh opened 3 years ago

patil-ashutosh commented 3 years ago

Description

Remove all line breaks from a string using regex Line break varies between operating system encodings.

  1. Line break on Windows would be \r\n
  2. Line break on Linux would be \n
  3. Line break on Apple would be \r

Acceptance Criteria

This repository is valid for HacktoberFest2020

Read before making PR - How to contribute on Github

Note: Feel free to open PR as these PR will be counted for hactoberfest acceptence

tw-ayush commented 3 years ago

rather then adding os specific check we I'd create three files

tw-ayush commented 3 years ago

If you agree to the solution can you assign this to me?

siddeshshewde commented 3 years ago

We can do it in a single file using if-else. Different files is not needed for this small task.

binkkatal commented 3 years ago

@patil-ashutosh raised a PR https://github.com/patil-ashutosh/go-regex-utility/pull/20