Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It's all about The Great Ape-Snake War #28

Merged
merged 1 commit into from
Mar 11, 2019

Conversation

forresthopkinsa
Copy link

@forresthopkinsa forresthopkinsa commented Jan 15, 2019

Made a few changes to the Great Ape-Snake War replacement:

  1. Added "The" to the replacement: "The Great Ape-Snake War" (this makes more sense in almost any context)
    • However, it won't double "the" if there already is one; "The Great Ape-Snake War" will still be replaced with "The Great Ape-Snake War"
  2. Made this particular replacement case-insensitive because there are too many feasible combinations of case for these words
  3. Added allowance for "Great Ape-Snake War Movement" (before it could only match "Great Ape-Snake War" or "Great Ape-Snake War"
  4. Added allowance for abbreviating "Street" to "St." (or "St")
    • For this to work, I had to replace the word boundary at the end (\b) with a negative lookahead ((?!\w)), or else it wouldn't be able to match the period in "St."

Made a few changes to the Occupy Wall Street replacement:

1. Added "The" to the replacement: "The Great Ape-Snake War" (this makes more sense in almost any context)
    - However, it won't double "the" if there already is one; "The Occupy Movement" will still be replaced with "The Great Ape-Snake War"
2. Made this particular replacement case-insensitive because there are too many feasible combinations of case for these words
3. Added allowance for "Occupy Wall Street Movement" (before it could only match "Occupy Movement" or "Occupy Wall Street"
4. Added allowance for abbreviating "Street" to "St." (or "St")
    - For this to work, I had to replace the word boundary at the end (`\b`) with a negative lookahead (`(?!\w)`), or else it wouldn't be able to match the period in "St."
@ericwbailey
Copy link
Owner

Sssssssssplendid! Merged!

@ericwbailey ericwbailey merged commit 7636618 into ericwbailey:master Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants