regex for hyphen word break
match the end of line hyphens that split up words
[a-zA-Z][\-]$[\n][a-zA-Z]
Regex Flags
global match
?
ignore case
?
multiline
?
dotAll
?
unicode
?
sticky
?
It illustrates not only the impor-
tance of the golden rule for asking questions—Ask what you want
to know, not something else—but also, more important, the ambi-
guities of language and the powerful force of context in interpret-
ing the meaning of questions and answers. Our colleague had
A hyphen appears at the end of a line when the word must be split to fit on the line
A hyphen word break is when a word is broken into 2 using a hyphen (-
) to be continued in the next line
This is especially useful in scraping data when you wanna join hyphen seperated words
Cheatsheet
expr | usage |
---|---|
/[a-zA-Z]/ | matches all lowercase and uppercase letters |
/$/ | matches end of a line |
iHateRegex
by
geon