Announcement

Collapse
No announcement yet.

Issue with REGEX grammar

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with REGEX grammar

    Folks, I have an issue where I can't get the regex in a grammar to work for the following:

    Code:
    <SESSTRANSFORMATIONINST ISREPARTITIONPOINT="NO" PIPELINE="22" SINSTANCENAME="Heart_Beat_Exp1" STAGE="44" TRANSFORMATIONNAME="Heart_Beat_Exp1" TRANSFORMATIONTYPE="Expression">
    I want the compare to IGNORE the PIPELINE="nn" or the STAGE="nn" items.

    I have tried a number of different regex's and NONE of them work (I have them all marked as unimportant, but it still shows as a delta).
    I've tried:
    PIPELINE="\d\d"
    PIPELINE="\d*"
    PIPELINE ="[0-9]*"

    In any online regex tester all of these work to find that PIPELINE="nn" term, but they are NOT working in the BC tool (BC4)
    I am doing this for the XML Sort grammar. I have OTHER items in the grammar that DO work, so not sure what is going on here.

    Any ideas?

  • #2
    Hello,

    Your RegEx looks ok, so my hunch is you have another definition that is larger (wider) that is swallowing the internal reg ex's here. For example, if you had a definition that matched on <sesstran to >, then that grammar would override any internal grammars.

    The Grammar Element list is an ordered list, but the topmost grammar only overrides if it is breaking a 'tie'. If another grammar is larger and already matched, then it is the grammar used for everything internal to it.

    To see what text is currently assigned which grammar, use the main text pane of the Text Compare, and click the blinking cursor to the left of the character you wish to inspect. In the bottom status pane on each side, we display the Line:Character Position information, and also the current Grammar Element name. If another element is already detected, could it's definition be altered or removed?
    Aaron P Scooter Software

    Comment

    Working...
    X