grep style to be applied before tab
Copy link to clipboard
Copied
How can I get a grep style to be applied before the tab spacing?
Copy link to clipboard
Copied
Wee need more information on the actual structure of the text to know for sure, but I suspect you don't actrually need a GREP style for this and an ordianry Nested Style applied up to one tab would be better.
Copy link to clipboard
Copied
[image: image.png]
Copy link to clipboard
Copied
You need to come back to the fiorum to attach your image. Email replies don't work.
Copy link to clipboard
Copied
w
Copy link to clipboard
Copied
It would help to see the non-printing characters, but it can certainly be done with nested styles.
Copy link to clipboard
Copied
Use this
^.+?\t
as grep style and everything before a tab gets bold.
Copy link to clipboard
Copied
Grep styles are less efficient than nested styles and should be avoided when unnecessary.
Copy link to clipboard
Copied
Oke than a nested style
Copy link to clipboard
Copied
but only the numbers get bold
the '1Tbsp' did not.
Copy link to clipboard
Copied
For me it is working!
Between the number and the tekst is that a tab or a space?
Copy link to clipboard
Copied
it's working for all, bot not the the '1 Tbsp.'
Copy link to clipboard
Copied
Remove the space before the first tab
Copy link to clipboard
Copied
Could you Show Hidden Characters on that one line that doesn't work? Maybe it has no tab in it?
Copy link to clipboard
Copied
Could also be a soft return on the line above...
Please show hidden characters in ALL your screen shots.
Copy link to clipboard
Copied
Soft return does not matter
Copy link to clipboard
Copied
Soft returns do not create a new paragraph, so the count in the nested style (or a GREP style) does not reset. I have no idea why your text is showing bold after the soft return. It should not be unless something else is at work.
Copy link to clipboard
Copied
it did work for the next one though
Copy link to clipboard
Copied
remove the 3 spaces before the 1
Copy link to clipboard
Copied
Or use the nested style, but than you cannot use soft return.
Copy link to clipboard
Copied
If the nested style is set properly to trigger on the second tab then the spaces are not an issue, though they should be removed as sloppy typesetting.
Copy link to clipboard
Copied
it worked now.
thanks all
Copy link to clipboard
Copied
Or use this grep
.+\t
than the space does not matter
Copy link to clipboard
Copied
Or use this grep
.+\t
than the space does not matter
By Richard-Elburg-Smit
It works in the case where there are only two tabs on the line, but not if there is another tab following text you don't want bolded.
In this case I think .+\t?\K.+\t? would be safer fro applying a style through two tabs.
Copy link to clipboard
Copied
it did work for the next one though
By hendy_5450
Well, it shouldn't have. You have a tab starting each line, so you need to apply the bold style up to (or through) TWO tabs.


-
- 1
- 2