Quantcast
Channel: Filtering lines based on pattern of couple of words - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2

Filtering lines based on pattern of couple of words

$
0
0

My text file looks like this:

city=london&language=en&x=12345&y=6789&z=7sometext?z=7city=dublin&language=en&x=12345&y=6789&z=7city=madrid&language=en&x=12345&y=6789&z=7sometext?ysometext?x

I need to filter the text by criteria - if certain line contains:

city, language, x, y, z anywhere in the line

leave this lines.

The output after filtering my data would be:

city=london&language=en&x=12345&y=6789&z=7city=dublin&language=en&x=12345&y=6789&z=7city=madrid&language=en&x=12345&y=6789&z=7

What is the simplest way to do it?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>