Created
September 5, 2018 00:07
-
-
Save animoplex/b9f600110ed151faf213361eeea323c3 to your computer and use it in GitHub Desktop.
Regular Expressions - After Effects Expression by Animoplex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Regular Expressions - Created by Animoplex: www.animoplex.com | |
// Complex methods of searching and replacing text dynamically. | |
// Full Tutorial: https://www.youtube.com/watch?v=oz352OsNgnI | |
// Check out http://regexr.com/ | |
// RegEx Examples | |
text.sourceText.replace(/one/gi,"1").replace(/two/gi,"2") // Replace "one" with "1" and "two" with "2" | |
text.sourceText.replace(/-/gi,"#") // Replace "-" with "#" | |
// Note: The /gi flags instruct the engine to search globally for text (g) and to be case insensitive (i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment