Copy link to clipboard
Copied
I created a grep style for some prices "$15.000" no problem i use this (\$\d+) however when i change the prise to "#1.5000" the grep does not work, it wont go pass the (.) Can you help?
Copy link to clipboard
Copied
Now you are using #, so you need to search like
(\#\d+)
also if you want to search including zero, use
(\#\d+[.]\d+)
Copy link to clipboard
Copied
dont get it, this is the code i am using, (\$\d+) can you write it out for me
Copy link to clipboard
Copied
When prices have $ then you can use (\$\d+)
If price have #, so you need use (\#\d+)
if you need find all with $ prices..use
(\$\d+[.]\d+)
HTH
Copy link to clipboard
Copied
Got it, now what if your price has a mixture of commas and periods. example $1,500 and $1.500 and $1500. Thanks this is helping
Copy link to clipboard
Copied
Simple..
for $1,500 (\$\d+[,]\d+)
for $1.500 (\$\d+[.]\d+)
for $1500 (\$\d+)
Copy link to clipboard
Copied
Awesome, i kinda figured it out, 2 more things is there a way to combine them so i don;t have to do 3 grep styles? if now i can live with this, you;re awesome man. After this i have one more but i would wait for you to answer this
Copy link to clipboard
Copied
Hmm.. you can use OR condition like
(\$\d+[.|,]\d+)
to check both for $1,500 and $1.500
Copy link to clipboard
Copied
Great, now its making sense to me, now for my other issue, i have the word (surprise) no problem there, however i want to have the same style if i capitalize the "S" , i swear this is my last issue and thanks in advance
Copy link to clipboard
Copied
What yo need to do with the s and S?
The case sensitive option is available in Text search.. not in Grep search
Copy link to clipboard
Copied
Just incase it starts in a paragraph.
Copy link to clipboard
Copied
Using ^ grep will go the beginning of paragraph
^(s|S)
Copy link to clipboard
Copied
having an issue with this, bear in mind this is my very first day using grep. not working maybe my coding is wrong "\surprise\^(s|S)"
Copy link to clipboard
Copied
If you want to find the first character of paragraph start with s or S then use
^(s|S)
not like \surprise\^(s|S)
Copy link to clipboard
Copied
I get that but i want the word "surprise" to be affected if its a lowercase "s" or uppercase "S"
Copy link to clipboard
Copied
^(s|S)urprise
Copy link to clipboard
Copied
… Or:
^((?i)s)urprise
(^/)
Copy link to clipboard
Copied
Karthi,
(?i)s
is equal to:
[sS] or (s|S)
(^/)
Copy link to clipboard
Copied
Thanks Obi.. It's my oversight
Copy link to clipboard
Copied
Thank you all, i learned a lot here
Copy link to clipboard
Copied
Karthi,
[.|,] is wrong!
It takes 3 chars: a dot, a comma OR a "|"
[.,] is the right writing.
(^/)