Macro - (.*) - What is this?
Moderators: Moderators, Documentation Writers
- 
				tyason01
- Noob 
- Posts: 3
- Joined: 17 Feb 2016, 14:18
- Noob?: Yes
Macro - (.*) - What is this?
What does it do? How to use?
			
			
									
						
										
						- 
				otaku
- Human 
- Posts: 28
- Joined: 29 Nov 2013, 21:50
- Noob?: No
- Location: Brazil
Re: Macro - (.*) - What is this?
You need to post examples. You mean something like this on a macro?
If that's what you meant, then it is a Perl regular expression.
Each of those symbols have their meanings:
. -> Matches any character (except the new line character)
* -> Means that the previous `symbol` appears 0 or more times
( and ) -> It specifies as a capture group whatever is enclosed in between
So (.*) will match and then capture anything that appears on the console in the previous code snippet.
			
			
									
						
							Code: Select all
automacro example {
	console /(.*)/
	call {
		# Whatever
	}
}
Each of those symbols have their meanings:
. -> Matches any character (except the new line character)
* -> Means that the previous `symbol` appears 0 or more times
( and ) -> It specifies as a capture group whatever is enclosed in between
So (.*) will match and then capture anything that appears on the console in the previous code snippet.
I'm watching my TV or is it watching me?