Emess
|
  |
| Joined: 01 Apr 2010 |
| Total Posts: 13331 |
|
|
| 03 Apr 2012 07:39 PM |
| I know how to do metatables and everything that would be considered 'advanced scripting', however I simply cannot wrap my head around string patterns. |
|
|
| Report Abuse |
|
|
CLIPSE
|
  |
| Joined: 29 Jan 2010 |
| Total Posts: 9723 |
|
| |
|
Emess
|
  |
| Joined: 01 Apr 2010 |
| Total Posts: 13331 |
|
| |
|
| |
|
Emess
|
  |
| Joined: 01 Apr 2010 |
| Total Posts: 13331 |
|
| |
|
Bubby4j
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 1831 |
|
|
| 03 Apr 2012 08:12 PM |
String patterns? Like manipulation?
Common things are Splitting a string:
split("The quick brown fox jumps over the lazy dog."," ") -- {"The","quick","brown","fox","jumps","over","the","lazy","dog."} |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 03 Apr 2012 08:48 PM |
| The roblox's wiki string pattern tutorial is actually not bad. It used to be horrible, with no "real manipulation" tutorials. Check it out. |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 03 Apr 2012 08:52 PM |
It's not hard. I'm not sure if ROBLOX's string patterns are similar to C++ regular expressions though, where you can have like character classes, etc..
Anyway, it's not that hard. You have characters that resemble various characters such as punctuation characters, lowercase characters, etc. The wiki tutorial is good as nate890 said.
http://wiki.roblox.com/index.php/String_Patterns |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 03 Apr 2012 08:56 PM |
Lua's string manipulation is quite great and sufficient. Math... ehh.
Bubby, "split" isn't a function? |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 03 Apr 2012 09:29 PM |
| String patterns are Lua's form of regular expressions. Lua doesn't have regular expressions because it was meant to be lightweight, and regular expression implementations were just too heavy. |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
| |
|