-2

I have a file in below format:

PAY_ST:anytext123here:GREEN:againanytexthere
PAY_ORD:anyntext144here:GREEN:againanytexthere  // <--- This type of record I want to extract
INT_ORD:anyntext1222here:RED:againanytexthere

I want to extract records only with first column text ends with ORD and 3rd column text is GREEN. In above example 2nd record.

Can someone help me provide a regex to use in textpad search?

Aftab
  • 1
  • 2
  • 1
    Does this answer your question? [Reference - What does this regex mean?](https://stackoverflow.com/questions/22937618/reference-what-does-this-regex-mean) – baduker May 27 '21 at 08:53

1 Answers1

0

Depending on the flavour of Regex you are using, this should help.

(PAY_ORD.*)\n

You can tune the example at this RegEx builder site.

Regex Example

I then suggest googling the text editor of your choice to understand details of Regex flavour your editor uses.

Meta I think this question is being marked down as your effectively asking someone to it for you, not how to learn to solve a more specific why is this regex expression not working.