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

「7. 言及している日報を表示する」の差分 / 「8. Railsでテストを書く」のスタート地点 #5

Open
wants to merge 20 commits into
base: 07-report_mention
Choose a base branch
from

Conversation

JunichiIto
Copy link
Collaborator

@JunichiIto JunichiIto commented Feb 12, 2023

コールバックを使わない別解もあります。
#6


private

MENTION_REGEXP = %r{http://localhost:3000/reports/(\d+)}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(別解)後読みを使うと31行目のflattenをなくせます。

Suggested change
MENTION_REGEXP = %r{http://localhost:3000/reports/(\d+)}
MENTION_REGEXP = %r{(?<=http://localhost:3000/reports/)\d+}

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.

1 participant