Skip to content

gawk regex \s giella #1

@eevvoor

Description

@eevvoor

giellalt/giella-core@293be5e

https://pastebin.com/aA5DXkS5

$ echo 'a b' | gawk '{ gsub(/[ \t]+/, "x"); print; }'
axb
$ echo 'a b' | gawk '{ gsub("[ \t]+", "x"); print; }'
axb
$ echo 'a b' | gawk '{ gsub("[\s]+", "x"); print; }'
gawk: cmd. line:1: warning: escape sequence `\s' treated as plain `s'
a b
$ echo 'a b' | gawk '{ gsub(/[\s]+/, "x"); print; }'
a b
$ echo 'a b' | gawk '{ gsub(/\s+/, "x"); print; }'
axb

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions