![]() ![]() The filepath is interpreted as c:\temp, because one of the backslashes is removed. ![]() In searches that include a regular expression that contains a double backslash, such as in a filepath like c:\\temp, the search interprets the first backslash as a regular expression escape character. If you want to match a period character, you must escape the period character by specifying \. For example, the period character is used in a regular expression to match any character, except a line break character. The backslash character ( \ ) is used in regular expressions to escape any special characters that have meaning in regular expressions, such as periods ( . ), double quotation marks ( " ), and backslashes themselves. This is interpreted by SPL as a search for the text "expression" OR "with pipe".īackslash characters in regular expressions For example, A or B is expressed as A | B.īecause pipe characters are used to separate commands in SPL, you must enclose a regular expression that uses the pipe character in quotation marks. Here are a few things that you should know about using regular expressions in Splunk searches.Ī pipe character ( | ) is used in regular expressions to specify an OR condition. You can also use regular expressions with evaluation functions such as match and replace. You can use regular expressions with the rex and regex commands. Regular expressions in the Splunk Search Processing Language (SPL) are PCRE (Perl Compatible Regular Expressions).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |