Announcement
Collapse
No announcement yet.
Minor Bug: Incorrectly marked as "Minor" Change
Collapse
X
-
You'll need to mark Comments (or other grammar types) that might occur in these strings as Important, as the multiline @" to " string might not catch them otherwise. You can set this default on the Home screen, in the Saved Sessions list, Edit session defaults folder, select Text Compare, and in the Importance tab check any unchecked items.
-
Originally posted by Aaron View PostOur RegEx does not support the full array of back referencing or lookbehind. That definition looks like it would match only when the quotes were on the same line, which our current delimited rule would match anyway?
You can see a list of our supported RegEx commands using the dropdown button next to the textbox entry, or in our Help file. I can't think of one that would help work around this in this particular case. Have you had a change to try reformatting the text, and see that it does detect the grammar correctly if it is a single (or double) line with escape character and end character on the same line?
Leave a comment:
-
Our RegEx does not support the full array of back referencing or lookbehind. That definition looks like it would match only when the quotes were on the same line, which our current delimited rule would match anyway?
You can see a list of our supported RegEx commands using the dropdown button next to the textbox entry, or in our Help file. I can't think of one that would help work around this in this particular case. Have you had a change to try reformatting the text, and see that it does detect the grammar correctly if it is a single (or double) line with escape character and end character on the same line?
Leave a comment:
-
That sounds about right. Part of the problem may be that in C#, " is used *only* to escape " and nothing else. My temptation is to useCode:@"
Code:"("")*
Code:@"
Code:[^"]"("")*
Code:string X = @" "" ";//>DEMO 1 ENDING"
Code:string X = @" "" ";//>DEMO 1 ENDING"
Actually, I think that may be a second issue...Last edited by Brian; 01-Oct-2012, 04:30 PM.
Leave a comment:
-
Hello,
Thanks for the example. I do see the issue you are running into. It has to do with the escape character not detecting in a delimited format that stretches over multiple lines and has the same character as the end of the delimit.
In the meantime, to get the string to detect correctly, you'll need to have the escape character and end of string on the same line within BC3. Example
Code:string X = @" ""a//>DEMO 1 ENDING";
Code:string X = @"""a//>DEMO 1 ENDING";
Leave a comment:
-
I don't think it's that simple. Consider this example
Txt1.cs
Code:string X = @" "" a//>DEMO 1 ENDING";
Code:string X = @" "" a//>DEMO 2 ENDING";
Leave a comment:
-
Hello,
We can, if you'd like to create a new custom File Format for these files (or edit the C# one provided) in the Tools menu -> File Formats.
The specific issue here is that:
"" is detected as a string
// is detected as the beginning of a comment
then everything that follows is also a comment.
If we define a grammar element that contains these elements and place it higher on the list, such as a new element:
""//"
This would match on the beginning part of the line, allowing
">DEMO 1 ENDING"
to match as a string.
The key is that the new element will need to contain text that is in the same relative position as the other grammar elements, otherwise those leftmost elements will still be matched on first (even if they are lower in the priority list of Grammar Elements).
Leave a comment:
-
Minor Bug: Incorrectly marked as "Minor" Change
Txt1.cs
Code:string X = @" "" ""//"">DEMO 1 ENDING";
Code:string X = @" "" ""//"">DEMO 2 ENDING";
Tags: None
Leave a comment: