Grep-Help

Viewing 5 reply threads
  • Author
    Posts
    • #72793

      Hi all,
      Can you help me with find/change GREP, I need to find out only number with % in this text ?

      thank you, any help appriciated

      Example:
      Ectio tem. Itatur simus, 2.3 % mod quisqua tusandi dolo molecum voluptatem aut pratis perum sequibus dolo quaectionse pre nis alignim odignam et etur sequatium re cusam 5.3 % quam fugia sinus evelita tusaped que di naturep udigni cum ulla sequi 100 % im eatur?

    • #72796
      David Blatner
      Keymaster

      This should work: [.\d]+? %
      (That means find a sequence of one or more digits or dots, followed by a space, followed by a percent symbol.

      • #73126
        Masood Ahmad
        Participant

        David, How did you manage to put your code in a light gray box with a slightly darker border. It is interesting and helpful to put codes separately.

      • #73128
        David Blatner
        Keymaster

        I use the html code tags. That is <code> and </code>

      • #73130
        Masood Ahmad
        Participant

        That’s brilliant. I have noted it down.

        Tip of the day! Thanks

    • #72808

      Yes, Very helpful

      Thank you very much!

    • #73102

      Hi everyone,

      How do I specify “one OR two characters”?

      I want to find a paragraph that starts with a specific word, then a space, then just one or two characters, and nothing else.

      ie:
      Chapter 8
      Chapter 22
      Chapter eleven…

      I need the code to find only the first two paragraphs, but not the third one.

      Many thanks for your help

    • #73103
      Aaron Troia
      Participant

      For finding “Chapter” followed by one or two numbers only, try:

      Chapter\d{1,2}\b
      -or-
      Chapter [0-9]{1,2}\b

    • #73337
      Chris Haynes
      Member

      My helpful grep style codes:

      (?<=m)2
      superscript m²

      [\(“‘].+?[‘”\)](?=[[:punct:]]|\s)
      Apply any style to any text inside ( ) or ” ” or ‘ ‘ – included in this code is to ignore the instance of an apostrophe that is not followed by any white space

Viewing 5 reply threads
  • You must be logged in to reply to this topic.
>