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

^ used in inaccurate example in regex-howto #80219

Closed
LouisMichael mannequin opened this issue Feb 19, 2019 · 2 comments
Closed

^ used in inaccurate example in regex-howto #80219

LouisMichael mannequin opened this issue Feb 19, 2019 · 2 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@LouisMichael
Copy link
Mannequin

LouisMichael mannequin commented Feb 19, 2019

BPO 36038
Nosy @ezio-melotti, @merwok, @willingc, @JulienPalard, @LouisMichael
Superseder
  • bpo-35584: Wrong statement about ^ in howto/regex.rst
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-02-19.16:35:21.659>
    created_at = <Date 2019-02-19.14:41:06.774>
    labels = ['3.8', 'type-feature', '3.7', 'docs']
    title = '^ used in inaccurate example in regex-howto'
    updated_at = <Date 2019-02-19.16:35:21.658>
    user = 'https://github.com/LouisMichael'

    bugs.python.org fields:

    activity = <Date 2019-02-19.16:35:21.658>
    actor = 'mdk'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2019-02-19.16:35:21.659>
    closer = 'mdk'
    components = ['Documentation']
    creation = <Date 2019-02-19.14:41:06.774>
    creator = 'louism'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36038
    keywords = []
    message_count = 2.0
    messages = ['335953', '335972']
    nosy_count = 6.0
    nosy_names = ['ezio.melotti', 'eric.araujo', 'docs@python', 'willingc', 'mdk', 'louism']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '35584'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue36038'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5', 'Python 3.6', 'Python 3.7', 'Python 3.8']

    @LouisMichael
    Copy link
    Mannequin Author

    LouisMichael mannequin commented Feb 19, 2019

    at https://docs.python.org/3/howto/regex.html#regex-howto
    and
    https://docs.python.org/3.8/howto/regex.html#regex-howto
    https://docs.python.org/3.7/howto/regex.html#regex-howto
    https://docs.python.org/3.6/howto/regex.html#regex-howto
    https://docs.python.org/3.5/howto/regex.html#regex-howto
    https://docs.python.org/3.4/howto/regex.html#regex-howto
    https://docs.python.org/2.7/howto/regex.html#regex-howto

    The following paragraph seems to have a small issue:
    "
    You can match the characters not listed within the class by complementing the set. This is indicated by including a '^' as the first character of the class; '^' outside a character class will simply match the '^' character. For example, [^5] will match any character except '5'.
    "
    ^ does not simply match ^ outside a character class since is a special character that represents the start of the string.

    I think the paragraph should read:
    You can match the characters not listed within the class by complementing the set. This is indicated by including a '^' as the first character of the class; '^' will act differently outside a character class as explained later. For example, [^5] will match any character except '5'.

    @LouisMichael LouisMichael mannequin added 3.7 (EOL) end of life 3.8 only security fixes labels Feb 19, 2019
    @LouisMichael LouisMichael mannequin assigned docspython Feb 19, 2019
    @LouisMichael LouisMichael mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Feb 19, 2019
    @JulienPalard
    Copy link
    Member

    Hi, thanks for reporting!

    It's a duplicate of https://bugs.python.org/issue35584, so I'm closing it, but if you feed like opening a PR on it, it would be appreciated.

    Bests.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant