Page 1 of 1

Regular Expression Searches with Selection Filter

Posted: 01 May 2012 19:56
by tiago
Can some of you please provide the missing parts ("????") for the codes below?
And please post other useful, common or not regex search codes?
Thanks!

Code: Select all

>^[(1-9)] - matches everything starting with numbers

>^[(a-z)] - matches everything starting with chars

>\[(.*)] - everything that has content within brackets "[]"

????  - everything that has NUMBERS within brackets "[]"

????  - everything that has CHARS within brackets "[]"

>\((\d+)\) - everything that has DIGITS within parentheses "()"

>\((\w+)\) - everything that has DIGITS or CHARS within parentheses "()"

????  - everything that has content within parentheses "()"

Re: Regular Expression Searches with Selection Filter

Posted: 01 May 2012 20:59
by highend
>^[(1-9)] - matches everything starting with numbers
? Your regex would match a "(", single digit or a ")" at the beginning of a line.
>^[(a-z)] - matches everything starting with chars
See my comment on the first pattern.
???? - everything that has NUMBERS within brackets "[]"
One way: \[(\d+)\]
Or do you mean numbers with delimiters, a la [120.423]?
???? - everything that has CHARS within brackets "[]"
\[([a-zA-Z]+)\]
???? - everything that has content within parentheses "()"
\((.+?)\)