Hot answers tagged

1

FINDSTR /I /C:"Registrant Name" Applied next paragraph from findstr artice: Searching for Spaces When the search string contains multiple words, separated with spaces, then FINDSTR will return lines that contain either word (OR). A literal search (/C:"string") will reverse this behaviour and allow searching for a phrase or sentence. A ...


1

If your grep supports -o, you can use the following: grep -o '"ID":"[a-f0-9]\{24\}"' | cut -d\" -f4 The first part extracts only the "ID":"..." part, the second one selects the 4th column, using " as the separator, i.e. the id itself. It's much safer to include the "ID": in the query, otherwise you can accidentally match a different part of the line.


1

I would use the regexp [$]\([a-zA-Z0-9_-]+\) and the replacement string ${\1}. Here's an explanation for my changes to your regexp: The character $ matches the "end of line" position, so you need to escape it when matching a literal $. Using [$] instead of \$ is a matter of taste (and it cuts down on backslashes that might need to be escaped if you want ...


1

Match string AFTER known word to End of Line Use the following regular expression: <(REMARKS:[0-9A-Z ]@[^13^|]) Notes: < matches "The beginning of a word" [0-9A-Z ] matches any number, uppercase letter, or space @ matches "One or more occurrences of the previous character or expression" [^13^|] matches a paragraph marker or a manual line break. ...


1

In both Excel and Calc, the cleanest solution is to create a general-purpose regular expression macro. To do this in Calc, go to Tools -> Macros -> Organize Macros -> LibreOffice Basic and add the following code to Module1: Function ReFind(findIn, patt, Optional group_param As Integer, _ Optional ignoreCase_param As Boolean) ' ...


1

What is the regular expressions to remove all XML? Menu "Search" > "Replace" (or Ctrl + H) Set "Find what" to Event Xml:(.*?)Event> Set "Replace with" to an empty string Enable "Regular expression" Enable ". matches newline" Click "Replace All" Before: Log Name: System Source: Service Control Manager Date: 2016/04/29 11:54:00 ...



Only top voted, non community-wiki answers of a minimum length are eligible