• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Grep Style Issue

Engaged ,
Nov 21, 2016 Nov 21, 2016

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?

Views

768

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 21, 2016 Nov 21, 2016

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+)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 21, 2016 Nov 21, 2016

Copy link to clipboard

Copied

dont get it, this is the code i am using, (\$\d+) can you write it out for me

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 21, 2016 Nov 21, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 21, 2016 Nov 21, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 21, 2016 Nov 21, 2016

Copy link to clipboard

Copied

Simple..

for $1,500           (\$\d+[,]\d+)

for $1.500          (\$\d+[.]\d+)

for $1500          (\$\d+)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 21, 2016 Nov 21, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 21, 2016 Nov 21, 2016

Copy link to clipboard

Copied

Hmm.. you can use OR condition  like

(\$\d+[.|,]\d+)

to check both for $1,500 and $1.500

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 21, 2016 Nov 21, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 21, 2016 Nov 21, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 21, 2016 Nov 21, 2016

Copy link to clipboard

Copied

Just incase it starts in a paragraph.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 21, 2016 Nov 21, 2016

Copy link to clipboard

Copied

Using  ^ grep will go the beginning of paragraph

^(s|S)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 21, 2016 Nov 21, 2016

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)"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 21, 2016 Nov 21, 2016

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 21, 2016 Nov 21, 2016

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"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 22, 2016 Nov 22, 2016

Copy link to clipboard

Copied

^(s|S)urprise

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 22, 2016 Nov 22, 2016

Copy link to clipboard

Copied

… Or:

^((?i)s)urprise

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 22, 2016 Nov 22, 2016

Copy link to clipboard

Copied

Karthi,

(?i)s

is equal to:

[sS]  or  (s|S)

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 22, 2016 Nov 22, 2016

Copy link to clipboard

Copied

Thanks Obi.. It's my oversight

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 22, 2016 Nov 22, 2016

Copy link to clipboard

Copied

LATEST

Thank you all, i learned a lot here

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 22, 2016 Nov 22, 2016

Copy link to clipboard

Copied

Karthi,

[.|,] is wrong!

It takes 3 chars: a dot, a comma OR a "|"

[.,] is the right writing.

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines