Page 1 of 1

Dictionary regular expressions: address start of line with ^ ?

Posted: Sat Apr 30, 2016 4:35 pm
by frimipiso
Hi,

I am a happy user of Textaloud now and I really like the regular expression functionality in the dictionary.

However, I don't know how to address the beginning of a line. I would like to find lines starting with an even or odd number.

If I use the "^" caret I only address the start of the file.

How can I address the start of a line?

Thanks,

Jens

Re: Dictionary regular expressions: address start of line with ^ ?

Posted: Mon May 02, 2016 10:09 am
by Jim Bretti
There is an option, (?m) you can use in your regular expression to turn on multiline mode. Use it like this:

(?m)^abc

This expression should match any line starting with abc.

By default ^ matches the beginning of the string being searched, and $ matches the end. In multiline mode, ^ matches the beginning of a line, and $ matches the end of a line.

Re: Dictionary regular expressions: address start of line with ^ ?

Posted: Mon May 02, 2016 5:34 pm
by frimipiso
Cool. Thanks,

Jens