mardi 1 août 2017

how to find a specific word having random located newline

As I stated on the title. I'm try to find regex result on a specific word(like apple) having random newline(\r\n) special character.

Illustrate more detail... Let's find a word 'apple' on the text file. but We don't know where is exact position of newline(\r\n) on the file like below...


ap

ple

or

appl

e


I also googled many pages but I couldn't find the answer. Should I have to write beginner regex like below? (a\r\npple|ap\r\nple|app\r\nle|appl\r\ne|apple\r\n|)

I need to find more smarter regex to find exact word.

Aucun commentaire:

Enregistrer un commentaire