User:Merlin11188/Draft: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Merlin11188
No edit summary
>Merlin11188
Added a picture; added locations to the descriptions; reordered slightly
 
(47 intermediate revisions by the same user not shown)
Line 1: Line 1:
===Patterns===
{{User:Merlin11188/Templates/NoEdit}}
{{EmphasisBox|Patterns require some knowledge of [[Function_Dump/String_Manipulation | string manipulation]].|red|dark=yes}}
<br/>
==Classes==
Character Class:


A character class is used to represent a set of characters. The following are character classes and their representations:
*'''x'''  — Where x is any non-magic character (^$()%.[]*+-?), x represents itself
*'''.'''  — Represents all characters (#32kas321fslk#?@34)
*'''%a''' — Represents all letters (aBcDeFgHiJkLmNoPqRsTuVwXyZ)
*'''%c''' — Represents all control characters (all ascii characters below 32 and ascii character 127)
*'''%d''' — Represents all base-10 digits (1-10)
*'''%l''' — Represents all lower-case letters (abcdefghijklmnopqrstuvwxyz)
*'''%p''' — Represents all punctuation characters (#^;,.) etc.
*'''%s''' — Represents all space characters
*'''%u''' — Represents all upper-case letters (ABCDEFGHIJKLMNOPQRSTUVWXYZ)
*'''%w''' — Represents all alpha-numeric characters (aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789)
*'''%x''' — Represents all hexadecimal digits (0123456789ABCDEF)
*'''%z''' — Represents the character with representation 0 (the null terminator)
*'''%x''' — Represents (where x is ''any non-alphanumeric character'') the character x. This is the standard way to escape the magic characters. Any punctuation character (even the non magic) can be preceded by a '%' when used to represent itself in a pattern. So, a percent sign in a string is "%%"  <br/>
Here's an example:


{{Example|<pre>
{{Stub}}
String="Ha! You'll never find any of these (323414123114452) numbers inside me!"
{|
print(string.match(String, "%d")) -- Find a digit character
|[[File:Home_Subpage.png|frame|A picture of the 'Home' tab on the submenu in 'My ROBLOX'.]] <br/>
|}
__TOC__


Output:
3
</pre>}}


An upper-case version of any of these classes results in the complement of that class. For instance, %A will represent all
===Character and Notifications===
non-letter characters. Here's another example:
{|
{{Example|<pre>
|On the far left of the page there is a picture of [[My_Character|your character]]. Underneath, there is a link to your system notifications.
Martian="141341432431413415072343E234141241312"
|[[File:Avatar_Notifications.png|frame|A picture of [[My_Character|your character]] with system notifications beneath it.]]
print(Martian:match("%D")) -- Find a non-digit character
|}


Output:
===Best Friends===
E
{|
</pre>}}
|Underneath of your avatar and notification box is your [[Friends#Best_Friends|best friends]] list. Here you can see what your best friends are doing (from their [[My_Home#Status_Update|shout box]]) and whether or not they're online.
==Modifiers==
|[[File:Best_Friends.png|frame|This a list of your [[Friends#Best_Friends|best friends]] and their most recent shouts!]]
In Lua, there are 4 modifiers:
|}
<ul>
<li>+ — 1 or more repetitions
<li>* — 0 or more repetitions
<li>- — also 0 or more repetitions
<li>? — optional (0 or 1 occurrence)
</ul>


===Status Update===
{|
|You can use this so that people who visit your profile can see what you're up to.
|[[File:Status Update.png|frame|This is the status update bar. People who have you as their [[Friends#Best_Friends|best friend]] will see it on their [[My_Home|home]]!]]
|}


* '''[set]''' represents the class which is the union of all characters in set. A range of characters may be specified by separating the end characters of the range with a '-'. All classes %x described above may also be used as components in set. All other characters in set represent themselves. For example, [%w_] (or [_%w]) represents all alphanumeric characters plus the underscore, [0-7] represents the octal digits, and [0-7%l%-] represents the octal digits plus the lowercase letters plus the '-' character.
===Feed===
{|
|Your feed is in the center of the page, just beneath your status update box. Your feed is a way to keep you updated with all of your groups. Every time someone uses the shout box in one of your [[groups]], you're updated here!
|[[File:Feed bar.png|frame|This is for your feed—all of your [[groups]]' shouts go here.]]
|}


The interaction between ranges and classes is not defined. Therefore, patterns like [%a-z] or [a-%%] have no meaning.
===Recently Played Games===
* '''[^set]''' represents the complement of set, where set is interpreted as above.
{|
|On the far right is the 'Recently Played Games' box. Your most recently played games can be seen here. If you want a larger list, you can click the '''See More''' button.
|[[File:Recently_Played_Games.png|frame|This is a list of your most recently played [[game]]s.]]
|}


For all classes represented by single letters (%a, %c, etc.), the corresponding uppercase letter represents the complement of the class. For instance, %S represents all non-space characters.
===Facebook Connect===
{|
|On the far right, underneath of the 'Recently Played Games' box is the Facebook connect box. If you have a Facebook account, you can link it to your ROBLOX account! See [[connecting your account to Facebook]] for more info.
|[[File:FacebookConnect_Unconnected.png|frame|Facebook connect. You can use this to link your Facebook account to your [[Roblox|ROBLOX]] account! Your personal info will '''not''' be shared with other users!]]
|}


The definitions of letter, space, and other character groups depend on the current locale. In particular, the class [a-z] may not be equivalent to %l.
<!--
Pattern Item:
{| class="wikitable" style="border-spacing: 0px; padding: 0px;"
 
|-
A pattern item may be
|[[File:Avatar + Notifications]]
 
|[[File:Status_Update.png]]
* a single character class, which matches any single character in the class;
|[[File:Recently_Played_Games.png|287px]]
* a single character class followed by '*', which matches 0 or more repetitions of characters in the class. These repetition items will always match the longest possible sequence;
|-
* a single character class followed by '+', which matches 1 or more repetitions of characters in the class. These repetition items will always match the longest possible sequence;
|[[File:Best_Friends.png]]
* a single character class followed by '-', which also matches 0 or more repetitions of characters in the class. Unlike '*', these repetition items will always match the shortest possible sequence;
|<div style="top:0px;">[[File:Feed_bar.png]]</div>
* a single character class followed by '?', which matches 0 or 1 occurrence of a character in the class;
|[[File:FacebookConnect_Unconnected.png]]
* %n, for n between 1 and 9; such item matches a substring equal to the n-th captured string (see below);
|}-->
* %bxy, where x and y are two distinct characters; such item matches strings that start with x, end with y, and where the x and y are balanced. This means that, if one reads the string from left to right, counting +1 for an x and -1 for a y, the ending y is the first y where the count reaches 0. For instance, the item %b() matches expressions with balanced parentheses.
 
Pattern:
 
A pattern is a sequence of pattern items. A '^' at the beginning of a pattern anchors the match at the beginning of the subject string. A '$' at the end of a pattern anchors the match at the end of the subject string. At other positions, '^' and '$' have no special meaning and represent themselves.
Captures:
 
A pattern may contain sub-patterns enclosed in parentheses; they describe captures. When a match succeeds, the substrings of the subject string that match captures are stored (captured) for future use. Captures are numbered according to their left parentheses. For instance, in the pattern "(a*(.)%w(%s*))", the part of the string matching "a*(.)%w(%s*)" is stored as the first capture (and therefore has number 1); the character matching "." is captured with number 2, and the part matching "%s*" has number 3.
 
As a special case, the empty capture () captures the current string position (a number). For instance, if we apply the pattern "()aa()" on the string "flaaap", there will be two captures: 3 and 5.
 
A pattern cannot contain embedded zeros. Use %z instead.

Latest revision as of 03:31, 12 March 2012

Do not edit!
The creator of this subpage does not want it to be edited without permission. Please discuss any changes that you think are relevant on the talk page.


Stub icon Stub
This article is a stub. If you think you know more about this than we do, please help us by contacting a writer.
Thank you!


A picture of the 'Home' tab on the submenu in 'My ROBLOX'.


Character and Notifications

On the far left of the page there is a picture of your character. Underneath, there is a link to your system notifications.
A picture of your character with system notifications beneath it.

Best Friends

Underneath of your avatar and notification box is your best friends list. Here you can see what your best friends are doing (from their shout box) and whether or not they're online.
This a list of your best friends and their most recent shouts!

Status Update

You can use this so that people who visit your profile can see what you're up to.
This is the status update bar. People who have you as their best friend will see it on their home!

Feed

Your feed is in the center of the page, just beneath your status update box. Your feed is a way to keep you updated with all of your groups. Every time someone uses the shout box in one of your groups, you're updated here!
This is for your feed—all of your groups' shouts go here.

Recently Played Games

On the far right is the 'Recently Played Games' box. Your most recently played games can be seen here. If you want a larger list, you can click the See More button.
This is a list of your most recently played games.

Facebook Connect

On the far right, underneath of the 'Recently Played Games' box is the Facebook connect box. If you have a Facebook account, you can link it to your ROBLOX account! See connecting your account to Facebook for more info.
Facebook connect. You can use this to link your Facebook account to your ROBLOX account! Your personal info will not be shared with other users!