Hi
I'm having trouble figuring out how my inline pattern should look like to match all occurences of "GB" and "%" from a string of
Memory: some GB (some %) of some GB
Best I could get to work so far was just using multiple InlinePatterns, but for "code cleanliness" sake, but I'd like to learn how to do it in single InlinePattern as I'm trying to get identical InlineOption for both
It is currently April 27th, 2024, 4:39 pm
[Solved] InlinePattern - How to match multiple occurences, and more than one strings?
-
- Posts: 291
- Joined: July 25th, 2011, 9:53 am
- Location: Lublin, Poland
[Solved] InlinePattern - How to match multiple occurences, and more than one strings?
Last edited by lysy1993lbn on November 18th, 2023, 9:33 pm, edited 1 time in total.
"Never argue with an idiot, he will drag you down to his level and beat you with experience."
my deviantART | Alternative Rainmeter tray icons
my deviantART | Alternative Rainmeter tray icons
-
- Rainmeter Sage
- Posts: 7177
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: InlinePattern - How to match multiple occurences, and more than one strings?
You can try (GB|%) in your InlinePattern option. It might work without capturing the group too, via (?:GB|%) in that option. The ( and ) stand for capturing the group, (?: and ) enclose a non capturing group, and | stands for a logical OR in the regular expressions.lysy1993lbn wrote: ↑November 18th, 2023, 7:54 pm Hi
I'm having trouble figuring out how my inline pattern should look like to match all occurences of "GB" and "%" from a string of
Memory: some GB (some %) of some GB
Best I could get to work so far was just using multiple InlinePatterns, but for "code cleanliness" sake, but I'd like to learn how to do it in single InlinePattern as I'm trying to get identical InlineOption for both
-
- Posts: 291
- Joined: July 25th, 2011, 9:53 am
- Location: Lublin, Poland
Re: InlinePattern - How to match multiple occurences, and more than one strings?
That did the trick. Thanks for rapid response
"Never argue with an idiot, he will drag you down to his level and beat you with experience."
my deviantART | Alternative Rainmeter tray icons
my deviantART | Alternative Rainmeter tray icons
-
- Rainmeter Sage
- Posts: 7177
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: InlinePattern - How to match multiple occurences, and more than one strings?
You're welcome - glad to help.