Editing Talk:1277: Ayn Random

Jump to: navigation, search
Ambox notice.png Please sign your posts with ~~~~

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 12: Line 12:
 
: Agreed, I would like to understand what the hell is going on with that. --[[User:Zagorath|Zagorath]] ([[User talk:Zagorath|talk]]) 09:20, 14 October 2013 (UTC)
 
: Agreed, I would like to understand what the hell is going on with that. --[[User:Zagorath|Zagorath]] ([[User talk:Zagorath|talk]]) 09:20, 14 October 2013 (UTC)
 
: How specific do you want it? Basically it matches two words consisting of the letters plurandy. The list of names is just a random selection of two part names that only consists of these letters. More specifically it matches: Two groups ({2}), each consisting of a word boundary (\b), followed by a non-empty sequence of the letters plurandy ([plurandy]+), followed by a word boundary (\b), finally followed by an optional space ( ?). [[User:Pmakholm|Pmakholm]] ([[User talk:Pmakholm|talk]]) 09:33, 14 October 2013 (UTC)
 
: How specific do you want it? Basically it matches two words consisting of the letters plurandy. The list of names is just a random selection of two part names that only consists of these letters. More specifically it matches: Two groups ({2}), each consisting of a word boundary (\b), followed by a non-empty sequence of the letters plurandy ([plurandy]+), followed by a word boundary (\b), finally followed by an optional space ( ?). [[User:Pmakholm|Pmakholm]] ([[User talk:Pmakholm|talk]]) 09:33, 14 October 2013 (UTC)
::Also, the /'s on the end delimit the regex proper, and the `i` on the end denotes case insensitivity. --[[Special:Contributions/75.66.178.177|75.66.178.177]] 09:39, 14 October
+
::Also, the /'s on the end delimit the regex proper, and the `i` on the end denotes case insensitivity. --[[Special:Contributions/75.66.178.177|75.66.178.177]] 09:39, 14 October 2013 (UTC)
2013 (UTC)
+
:Some examples:
:::In the explanation of how the regex works after the explanation "'''the {2} on the end means to repeat the pattern, so it must match exactly twice'''" I think you need an explanation of how the optional space in the middle interacts with the word boundaries.  I.e.
 
::::(\b[plurandy]+\b ?){2}
 
:::Expanding:
 
::::\b[plurandy]+\b ?\b[plurandy]+\b ?
 
:::Now the optional space at the end is redundant, and the space in the center is not optional, since if there is no space the word boundaries do not exist.  If the space is present the word boundaries are redundent because letter space letter sequence always matches them.
 
::::\b[plurandy]+ [plurandy]+\b ?
 
:::And this now closely matches the text description "'''Overall, it matches two words separated by a space, composed entirely of the letters in [plurandy], which is what all the names listed have in common.'''" --[[Special:Contributions/108.17.2.71|108.17.2.71]] 17:26, 16 October 2013 (UTC)
 
:Some examples
 
 
:* "Ru Paul" would match, because it is two sequences, each containing only capital or lowercase versions of the listed letters.
 
:* "Ru Paul" would match, because it is two sequences, each containing only capital or lowercase versions of the listed letters.
 
:* "Randall Flagg" would not match, because the letters F and G are not in the bracketed list.
 
:* "Randall Flagg" would not match, because the letters F and G are not in the bracketed list.

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)

Templates used on this page: