Regular Expression Searches with Selection Filter

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Regular Expression Searches with Selection Filter

Post 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 "()"
Power-hungry user!!!

highend
Posts: 14955
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Regular Expression Searches with Selection Filter

Post 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 "()"
\((.+?)\)
One of my scripts helped you out? Please donate via Paypal

Post Reply