Need help with this regex '^\*\|local7.*\s*\/[a-z]*'
Hi there,
As the title says, can someone explain to me what does that regex do? If possible, I would like to understand what each of these does. \* \|local7 .* \s* \/ [a-z]* Thank you very much! |
Can you please give us some context? Where did you dig this up, which tool/language
was it in? While 'regex' is a fairly well-known concept just about any tool you touch that uses regex' will have a slightly different implementation. If I assumed that the above was out of e.g., a perl snippet I'd break it up like so, and would have to say that it's a weird (poorly written) regex: Match anything that is either Beginning of line, followed by any number of '\' followed by a backslash (the one behind the * doesn't make sense). Code:
^\*\ Code:
| followed by \/ followed by any number of lower case characters. Code:
local7.*\s*\/[a-z]* All up it makes little sense. Cheers, Tink |
Quote:
I've read it a couple of times; very good. |
As the other's have said, it will depend on where this came from and I will show you why, as this is how I interpreted it:
Code:
^ - start of the line / string |
All times are GMT -5. The time now is 07:03 PM. |