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

Add "See also" sections to regex function docstrings #56900

Closed
wants to merge 2 commits into from

Conversation

AnkitaVekariya
Copy link

Description:
This PR adds "See also" sections to the docstrings of various regex functions to improve documentation navigation. The goal is to help users easily find related functions when working with regular expressions in Julia.

Fixes #56752

Changes:

  • Added See also references in the docstrings of the following functions:
    • startswith
    • endswith
    • match
    • eachmatch
    • findall
    • count

These references link related functions such as occursin, replace, findfirst, and findnext to provide a more cohesive understanding of how to work with regex operations in Julia.

@tecosaur
Copy link
Contributor

To me, "Also, see X for reasons, Y for other reasons" would read better. I consider "See also" to be rather specific to the citation-y list of items form, such as:

  • "See also X and Y"
  • "See also: X, Y, Z"
  • "See also X (because reasons)"
  • "foo bar (See also baz)"

@inkydragon inkydragon added the docs This change adds or pertains to documentation label Dec 24, 2024
@AnkitaVekariya
Copy link
Author

AnkitaVekariya commented Dec 24, 2024

To me, "Also, see X for reasons, Y for other reasons" would read better. I consider "See also" to be rather specific to the citation-y list of items form, such as:

  • "See also X and Y"
  • "See also: X, Y, Z"
  • "See also X (because reasons)"
  • "foo bar (See also baz)"

Thank you for the thoughtful feedback! I really appreciate the suggestions on improving the "See also" sections. I've updated the docstrings based on your advice, aiming to make them more readable and concise while providing better context for the related functions. Here’s an example of the updated format:

See also

  • match: to find the first match of a regular expression.
  • eachmatch: to iterate over all matches of a regular expression.
  • findall: to locate all indices of matches in a string.

@tecosaur
Copy link
Contributor

"See also:" then a list is stylistically good I think 👍, no need to make it a heading though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "See also" to the regex function docstrings
3 participants