ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Extract REGEX matches from multiple text files

<< < (16/22) > >>

kalos:
How can I do that?
-kalos (August 20, 2018, 08:37 AM)
--- End quote ---
That's why we asked more specific questions, but you never answered them.
So then I gave you the assignment of answering all our unanswered questions, but you haven't done that up until now, so basically, we are waiting (but not holding our breath) for your answers, before accepting new questions. :(
-Ath (August 20, 2018, 08:59 AM)
--- End quote ---


OK I start again:

That finally makes some sense. Here is an example solution for putting that into a .csv formatted file.
-Ath (August 13, 2018, 02:05 PM)
--- End quote ---

The problem with that is that I do not always know the node tree hierarchy and also it may change per record! That's why I cannot use the node tree hierarchy to extract a value, but I can use a guess of it, if that helps, eg //NODE1/*/NODE3/ ?

It doesn't even look a teensy bit like this new data you've given just now, are you playing us?
-Ath (August 13, 2018, 02:05 PM)
--- End quote ---

It looks the same to me??? Only the attribute names and values change. But again, the records do not contain the same attributes and in the same order. There can be some basic rules that all records follow, but unfortunately the data structure is not consistent, that's why I want to use regex, to include some fuzziness in matching!

Also, I still have not figured out how to make Powershell match . any character including newline... Any hint?

4wd:
Also, I still have not figured out how to make Powershell match . any character including newline... Any hint?-kalos (August 20, 2018, 09:36 AM)
--- End quote ---

Learn to use Powershell's built-in help system:

--- Code: PowerShell ---Get-Help about_comparison_operators
Learn to use Google:
http://lmgtfy.com/?q=powershell+regex+match+any+character+including+newline
http://lmgtfy.com/?q=powershell+regex+match+multiline
http://bfy.tw/JV48

kalos:
Also, I still have not figured out how to make Powershell match . any character including newline... Any hint?-kalos (August 20, 2018, 09:36 AM)
--- End quote ---

Learn to use Powershell's built-in help system:

--- Code: PowerShell ---Get-Help about_comparison_operators
Learn to use Google:
http://lmgtfy.com/?q=powershell+regex+match+any+character+including+newline
http://lmgtfy.com/?q=powershell+regex+match+multiline
http://bfy.tw/JV48
-4wd (August 20, 2018, 07:15 PM)
--- End quote ---

 :up: but I cannot see in the list of operators the OR  :tellme:

4wd:
but I cannot see in the list of operators the OR  :tellme:-kalos (August 21, 2018, 04:02 AM)
--- End quote ---


--- Code: PowerShell ---Get-Help about_Logical_Operators

kalos:
but I cannot see in the list of operators the OR  :tellme:-kalos (August 21, 2018, 04:02 AM)
--- End quote ---


--- Code: PowerShell ---Get-Help about_Logical_Operators-4wd (August 21, 2018, 07:49 AM)
--- End quote ---

I did that, but I get this:


--- ---PS H:\> Get-Help about_Logical_Operators
Get-Help : Get-Help could not find about_Logical_Operators in a help file in this session. To download updated help
topics type: "Update-Help". To get help online, search for the help topic in the TechNet library at
http://go.microsoft.com/fwlink/?LinkID=107116.
At line:1 char:1
+ Get-Help about_Logical_Operators
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [Get-Help], HelpNotFoundException
    + FullyQualifiedErrorId : HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version