regex

Hello.

I have a regex search function for the SplitString Function looking like this:
    String prefix, suffix
    String regex = "(.*)\\bG\\b(.*)"
    String target = "gnoise(G)"

    SplitString/E=regex target, prefix, suffix
   
    if(V_flag == 2)
        print prefix, "<found>", suffix
    endif


Do I need to double escape the WORD characters? - Single Escaping also seems to work. How is Igor handling it internally. If I were in vim or grep on the cli, double escaping would be required because the pattern is parsed once by them editor. How about igor?
Execute
DisplayHelpTopic "Backslash in Regular Expressions"


The key part is:
Because Igor also has special uses for backslash (see Escape Sequences in Strings), you must double the number of backslashes you would normally use for a Perl or grep pattern. Each pair of backslashes tells Igor's compiler to send one backslash to, say, the Grep command.


Igor's literal string interpreter converts \<character> to something else if is one of the characters that it recognizes. At present, it converts \t to tab, \r to carriage return, \n to linefeed, \" to double quote, \' to single quote, and \\ to backslash and certain other patterns to numbers. For details, execute:
DisplayHelpTopic "Escape Sequences in Strings"  // Igor7


or
DisplayHelpTopic "Escape Characters in Strings"  // Igor6


In your example, you could use "\b" or "\\b" because, at present, Igor does not convert "\b" to anything.You should not assume this but rather follow the rule stated above.