From Regex to Regex

sed -n '/regexp/,$p'
Was trying just having it twice..and a few other attempts but really none that worked

I cant get that to work, and havent heard too much about IFS..let me start over real fast..
I have a file that i broke up into two parts.
These Commands:
cat myfile.txt | sed -n '/regex/,/regex/{/regex/d;p}' | sed -n '/---/,+3!p' | sed -n '/#/!p' | sed 's/^[ ]*//' | sed -e s/[^:]*://
Gives me the first part of the file.
And These Commands:
cat myFile.txt | sed -n '/regex/,/regex/{/regex/d;p}' | sed -n '/#/!p' | sed -e s/[^:]*:// | sed /--------/,+10d
Basically spliting the file up into two parts.
Now..Finally...I can redirect to a text file. So do a chmod +X myfile.txt so i can execute it.
But wait... I need to execute them one by one..and compare the output..
So yeah, scripting this would be the way to go..Your right i would have two arguments. But when i use my.txt my2.txt nothing happens.
Again i need to execute each line of commands one by one.. The File looks like this:
find /home -name ".bashrc" -printf "%h\n" 2>/dev/null | sed -r 's/.*\/([^\/]*$)/\1/'
grep -e "^[^:\.]*:" /etc/passwd | cut -d':' -f1
grep -E "^[^:]{11,}:" /etc/passwd | cut -d':' -f1
find / -regextype posix-extended -regex ".*\/[^\/]{11,}$" -printf "%H%f\n"2>/dev/null
And FileB:
find / -type f -name '.bashrc' -print -exec grep PS1 '{}' \; 2>/dev/null | xargs ls -l 2>/dev/null
find /home -name '.bashrc' 2>/dev/null
cat /etc/passwd | cut -d':' -f1 | grep -v "\." | sort
cat /home/student/joseph.hodges/item4.txt | cut -d"/" -f4 | egrep '[A-Za-z]{10,}$'
cat /etc/passwd | cut -d':' -f1 | egrep '[A-Za-z]{10,}$'
du / -b 2>/dev/null | egrep '^.*/[^/]{10,}$' | head -20
I've been trying to figure out how i can execute a line from a each file upon specification of $1 and $2 and then compare them.
Last edited by oxoxo (2008-12-03 06:03:45)

Similar Messages

  • B1i Truncating space characters in elements from RegEx flat file SLD

    Task:
    I'm importing from a fixed-width file that's specifically 94 characters wide consisting of multiple columns.  My only concern at this point is the number of lines and their width.  I have to pad the block out to a specific number of lines, and all existing lines in my source file already fill all 94 characters.  Multiple headers and footers exist in the same flat file, so defining the format explicitly based on column width in RegEx will add significant time to the project (though it's not necessarily impossible).
    This file ends lines with a single LF character (no CR), which apparently is too much for TXT and CSV formats to handle (the entire file comes in as one line).  So I turned to Regex, where I can split the document on arbitrary characters like LFs.
    I've recorded a message and the lines look something like this:
    "ABB CCCCCCCCC DDDDDDDDDEEEEEEFFFFGHHHIIJKKKKKK KKKK K KKKKK    KKKKKK KKKK K KKKKK    LLLLLLLL"
    and column L is occasionally blank (just spaces).  This is one of the row formats present in the file.  Most of the columns use spaces as fill characters and are left justified.
    Tag definition looks like this:
    <tagDefinition xmlns="urn:com.sap.b1i.bizprocessor:pltdefinition" regex="\n" schemaName="" tagName="line" matchSplit="S" stackSize="10000" DOTALL="true" MULTILINE="false">
    </tagDefinition>
    Problems:
    With a recorded test messsage, the lines build properly:
    <Payload Role="S" intype="rgx_ruledoc">
    <bfa:io xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" pltype="rgx" schemaName="">
      <line xmlns="">ABB CCCCCCCCC DDDDDDDDDEEEEEEFFFFGHHHIIJKKKKKK KKKK K KKKKK    KKKKKK KKKK K KKKKK            </line>
    </bfa:io>
    </Payload>
    But by the time it reaches my first XSL Transformation atom, I receive the data in this form:
    <Payload Role="S" intype="rgx_ruledoc">
    <bfa:io xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" pltype="rgx" schemaName="">
      <line xmlns="">ABB CCCCCCCCC DDDDDDDDDEEEEEEFFFFGHHHIIJKKKKKK KKKK K KKKKK KKKKKK KKKK K KKKKK </line>
    </bfa:io>
    </Payload>
    In other words, I'm missing 3 spaces from within the middle of K and 11 from the end of the example line.  Multiple lines are affected by this.  I've built the Regex import portion properly, judging by the test message.  But the data I build is not the data I'm given.  And the truncation seems to be happening somewhere outside my control.
    Questions:
    1. Is there a way to specify that all spaces are non-breaking in the input/output format descriptors?
    2. Is there a way I can specify that B1i doesn't modify the data before handing it to me?
    3. Is there an easier/more correct way to do this?
    Also possibly 4. Can you specify line endings in TXT/CSV imports?

    As far as I've found, there's no way to specify that B1i doesn't normalize spaces for you in an input Msg.  I ended up splitting the incoming message line to its individual columns using the Regex format descriptor.  That way, I was able to track the integrity of each component of the message.
    However, when writing out to the same file format using the TXT file type, B1i is inserting commas between the columns, despite:
    1. Being TXT format, which shouldn't use delimiters.
    2. Having the delimiter field empty.  It correctly ignores this field, even if it does insert a delimiter.
    3. Specifying no delimiter explicitly using <FileOut type="file_full">/<Control><deli>.
    It seems odd that the included means for writing raw text would mangle the output message so.
    Has anyone successfully written data to a TXT file with no delimiter?

  • Getting more than one result from regex groups

    Thanks to everyone in advance -
    I cannot seem to figure out why I wouldnt receive multiple groups back from this match. I would assume I would receive:
    [hello]
    [john]
    instead i am getting:
    [hello]
    [hello]
    It seems like the regex stops after the first match is found, which leads me to believe that it has to do with some sort of flag -
         String Format = "[hello] my name is [sam]";
              String RegexPattern = "(\\[.*?\\])";
              Pattern MyPattern = Pattern.compile(RegexPattern, Pattern.CASE_INSENSITIVE | Pattern.DOTALL );
              Matcher MyMatcher = MyPattern.matcher(Format);
              if(MyMatcher.find()) {
                   for(int i = 0; i <= MyMatcher.groupCount(); i++) {
                        out.print(MyMatcher.group(i) +"<br>");
              }Thanks,
    Sam

    Groups are a static concept. You only have one group.
    while(MyMatcher.find()) {
        out.print(MyMatcher.group(1) +"<br>");
    }

  • Can we eliminate " from a String using regEx?

    Hi,
    I have a process and we are calling an external web service.
    Within code, I am setting the response from web service(string) to bpm object and using the same object in jsp for presentation.
    For Ex.
    bpmObject.empName = response from web service.
    within the jsp, have a java script where in I am validating the value.
    var empNm= "<f:fieldValue att="bpmObject.empName" onlyValue="true"/>";
    It works fine but some times when response from web service is having '"' - double quote, it is giving error.
    For Ex. bpmObject.empName = FirstName "SecondName" then the javascript error occurs. how can we remove the double quote from this?
    Tried bpmObject.empName.replace(from : "\"", @to : " ") but it is still giving the same output FirstName "SecondName"
    It works fine when I test by using a String str = "FirstName\"SecondName\"".replace(from : "\"", @to : " ") is giving correct result i.e. FirstName SecondName
    Can RegEx help in this?
    Thanks

    I know its better to handle in jsp/javascript
    var empNm= "<f:fieldValue att="bpmObject.empName" onlyValue="true"/>";
    but the above line is giving javascript error always.
    how to handle the same in bpm fpr code?
    Edited by: Sreekant on Mar 3, 2011 1:44 AM

  • Find Replace from Textfile with regex

    Hello.
    I'm wondering if anyone knows about an existing script that does a find/replace by list like the script "FindChangeByList.jsx" that comes with every InDesign installation.
    This consists of tow parts, the script itself with the functionality and a simple textfile where you have simple one-liners capable of find/replace with regex.
    the Textfile:
    //FindChangeList.txt
    //A support file for the InDesign CS4 JavaScript FindChangeByList.jsx
    //This data file is tab-delimited, with carriage returns separating records.
    //The format of each record in the file is:
    //findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description
    //Where:
    //<tab> is a tab character
    //findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use).
    //findProperties is a properties record (as text) of the find preferences.
    //changeProperties is a properties record (as text) of the change preferences.
    //findChangeOptions is a properties record (as text) of the find/change options.
    //description is a description of the find/change operation
    //Very simple example:
    //text          {findWhat:"--"}          {changeTo:"^_"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double dashes and replace with an em dash.
    //More complex example:
    //text          {findWhat:"^9^9.^9^9"}          {appliedCharacterStyle:"price"}          {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}          Find $10.00 to $99.99 and apply the character style "price".
    //All InDesign search metacharacters are allowed in the "findWhat" and "changeTo" properties for findTextPreferences and changeTextPreferences.
    //If you enter backslashes in the findWhat property of the findGrepPreferences object, they must be "escaped"
    //as shown in the example below:
    //{findWhat:"\\s+"}
    grep          {findWhat:"  +"}          {changeTo:" "}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double spaces and replace with single spaces.
    grep          {findWhat:"\r "}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a space And replace with single returns.
    grep          {findWhat:" \r"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a space and replace with single returns.
    grep          {findWhat:"\t\t+"}          {changeTo:"\t"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double tab characters and replace with single tab characters.
    grep          {findWhat:"\r\t"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a tab character and replace with single returns.
    grep          {findWhat:"\t\r"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a tab character and replace with single returns.
    grep          {findWhat:"\r\r+"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double returns and replace with single returns.
    text          {findWhat:" - "}          {changeTo:"^="}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all space-dash-space and replace with an en dash.
    text          {findWhat:"--"}          {changeTo:"^_"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all dash-dash and replace with an em dash.
    The script:
    //FindChangeByList.jsx
    //An InDesign CS5.5 JavaScript
    @@@BUILDINFO@@@ "FindChangeByList.jsx" 3.0.0 15 December 2009
    //Loads a series of tab-delimited strings from a text file, then performs a series
    //of find/change operations based on the strings read from the file.
    //The data file is tab-delimited, with carriage returns separating records.
    //The format of each record in the file is:
    //findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description
    //Where:
    //<tab> is a tab character
    //findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use).
    //findProperties is a properties record (as text) of the find preferences.
    //changeProperties is a properties record (as text) of the change preferences.
    //findChangeOptions is a properties record (as text) of the find/change options.
    //description is a description of the find/change operation
    //Very simple example:
    //text          {findWhat:"--"}          {changeTo:"^_"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double dashes and replace with an em dash.
    //More complex example:
    //text          {findWhat:"^9^9.^9^9"}          {appliedCharacterStyle:"price"}          {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}          Find $10.00 to $99.99 and apply the character style "price".
    //All InDesign search metacharacters are allowed in the "findWhat" and "changeTo" properties for findTextPreferences and changeTextPreferences.
    //If you enter backslashes in the findWhat property of the findGrepPreferences object, they must be "escaped"
    //as shown in the example below:
    //{findWhat:"\\s+"}
    //For more on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting/index.html
    //or visit the InDesign Scripting User to User forum at http://www.adobeforums.com
    main();
    function main(){
              var myObject;
              //Make certain that user interaction (display of dialogs, etc.) is turned on.
              app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
              if(app.documents.length > 0){
                        if(app.selection.length > 0){
                                  switch(app.selection[0].constructor.name){
                                            case "InsertionPoint":
                                            case "Character":
                                            case "Word":
                                            case "TextStyleRange":
                                            case "Line":
                                            case "Paragraph":
                                            case "TextColumn":
                                            case "Text":
                                            case "Cell":
                                            case "Column":
                                            case "Row":
                                            case "Table":
                                                      myDisplayDialog();
                                                      break;
                                            default:
                                                      //Something was selected, but it wasn't a text object, so search the document.
                                                      myFindChangeByList(app.documents.item(0));
                        else{
                                  //Nothing was selected, so simply search the document.
                                  myFindChangeByList(app.documents.item(0));
              else{
                        alert("No documents are open. Please open a document and try again.");
    function myDisplayDialog(){
              var myObject;
              var myDialog = app.dialogs.add({name:"FindChangeByList"});
              with(myDialog.dialogColumns.add()){
                        with(dialogRows.add()){
                                  with(dialogColumns.add()){
                                            staticTexts.add({staticLabel:"Search Range:"});
                                  var myRangeButtons = radiobuttonGroups.add();
                                  with(myRangeButtons){
                                            radiobuttonControls.add({staticLabel:"Document", checkedState:true});
                                            radiobuttonControls.add({staticLabel:"Selected Story"});
                                            if(app.selection[0].contents != ""){
                                                      radiobuttonControls.add({staticLabel:"Selection", checkedState:true});
              var myResult = myDialog.show();
              if(myResult == true){
                        switch(myRangeButtons.selectedButton){
                                  case 0:
                                            myObject = app.documents.item(0);
                                            break;
                                  case 1:
                                            myObject = app.selection[0].parentStory;
                                            break;
                                  case 2:
                                            myObject = app.selection[0];
                                            break;
                        myDialog.destroy();
                        myFindChangeByList(myObject);
              else{
                        myDialog.destroy();
    function myFindChangeByList(myObject){
              var myScriptFileName, myFindChangeFile, myFindChangeFileName, myScriptFile, myResult;
              var myFindChangeArray, myFindPreferences, myChangePreferences, myFindLimit, myStory;
              var myStartCharacter, myEndCharacter;
              var myFindChangeFile = myFindFile("/FindChangeSupport/FindChangeList.txt")
              if(myFindChangeFile != null){
                        myFindChangeFile = File(myFindChangeFile);
                        var myResult = myFindChangeFile.open("r", undefined, undefined);
                        if(myResult == true){
                                  //Loop through the find/change operations.
                                  do{
                                            myLine = myFindChangeFile.readln();
                                            //Ignore comment lines and blank lines.
                                            if((myLine.substring(0,4)=="text")||(myLine.substring(0,4)=="grep")|| (myLine.substring(0,5)=="glyph")){
                                                      myFindChangeArray = myLine.split("\t");
                                                      //The first field in the line is the findType string.
                                                      myFindType = myFindChangeArray[0];
                                                      //The second field in the line is the FindPreferences string.
                                                      myFindPreferences = myFindChangeArray[1];
                                                      //The second field in the line is the ChangePreferences string.
                                                      myChangePreferences = myFindChangeArray[2];
                                                      //The fourth field is the range--used only by text find/change.
                                                      myFindChangeOptions = myFindChangeArray[3];
                                                      switch(myFindType){
                                                                case "text":
                                                                          myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                                                          break;
                                                                case "grep":
                                                                          myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                                                          break;
                                                                case "glyph":
                                                                          myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                                                          break;
                                  } while(myFindChangeFile.eof == false);
                                  myFindChangeFile.close();
    function myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
              //Reset the find/change preferences before each search.
              app.changeTextPreferences = NothingEnum.nothing;
              app.findTextPreferences = NothingEnum.nothing;
              var myString = "app.findTextPreferences.properties = "+ myFindPreferences + ";";
              myString += "app.changeTextPreferences.properties = " + myChangePreferences + ";";
              myString += "app.findChangeTextOptions.properties = " + myFindChangeOptions + ";";
              app.doScript(myString, ScriptLanguage.javascript);
              myFoundItems = myObject.changeText();
              //Reset the find/change preferences after each search.
              app.changeTextPreferences = NothingEnum.nothing;
              app.findTextPreferences = NothingEnum.nothing;
    function myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
              //Reset the find/change grep preferences before each search.
              app.changeGrepPreferences = NothingEnum.nothing;
              app.findGrepPreferences = NothingEnum.nothing;
              var myString = "app.findGrepPreferences.properties = "+ myFindPreferences + ";";
              myString += "app.changeGrepPreferences.properties = " + myChangePreferences + ";";
              myString += "app.findChangeGrepOptions.properties = " + myFindChangeOptions + ";";
              app.doScript(myString, ScriptLanguage.javascript);
              var myFoundItems = myObject.changeGrep();
              //Reset the find/change grep preferences after each search.
              app.changeGrepPreferences = NothingEnum.nothing;
              app.findGrepPreferences = NothingEnum.nothing;
    function myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
              //Reset the find/change glyph preferences before each search.
              app.changeGlyphPreferences = NothingEnum.nothing;
              app.findGlyphPreferences = NothingEnum.nothing;
              var myString = "app.findGlyphPreferences.properties = "+ myFindPreferences + ";";
              myString += "app.changeGlyphPreferences.properties = " + myChangePreferences + ";";
              myString += "app.findChangeGlyphOptions.properties = " + myFindChangeOptions + ";";
              app.doScript(myString, ScriptLanguage.javascript);
              var myFoundItems = myObject.changeGlyph();
              //Reset the find/change glyph preferences after each search.
              app.changeGlyphPreferences = NothingEnum.nothing;
              app.findGlyphPreferences = NothingEnum.nothing;
    function myFindFile(myFilePath){
              var myScriptFile = myGetScriptPath();
              var myScriptFile = File(myScriptFile);
              var myScriptFolder = myScriptFile.path;
              myFilePath = myScriptFolder + myFilePath;
              if(File(myFilePath).exists == false){
                        //Display a dialog.
                        myFilePath = File.openDialog("Choose the file containing your find/change list");
              return myFilePath;
    function myGetScriptPath(){
              try{
                        myFile = app.activeScript;
              catch(myError){
                        myFile = myError.fileName;
              return myFile;
    This is a very useful and easy to maintain script which even people who cant write scripts (but know how to use regex) can do complex search replace mass replacements.
    Would love to find something like this for FrameMaker 12 (as i can't write scripts myself).
    regards
    daniel

    I have visited that site. The first item in the external link says: "You can also configure Firefox to automatically search for text when you type any characters outside of a text field. When typing in a text field these characters should show up in the text field and not trigger the Quick Find bar. "
    What I am looking for is the exact opposite. Once my first search is entered in the text box, and the info comes back, I want to start typing the next symbol, and have it automatically show up in the text box, not the Quick Find box. That is how it was working up until a couple of months ago.

  • Regex gurus: Intermittent stack overflow from Matcher?

    I've been using the following code to grep out links from <a> tags in html. For some pages it is throwing stack overflows from within the pattern matcher class. I am wondering, is there a better way to be doing this, or did I make some kind of mistake that is causing this to happen? Any help or advice would be greatly appreciated.
        private static final String matchATags    = "(?i)<a(.|\\n)*?>";
        private static final String matchHREFPre  = "(?i)\\A(.|\n)*HREF\\s*=\\s*\"";
        private static final String matchHREFPost = "\"(.|\n)*$";
        private static final Pattern tagPattern = Pattern.compile(matchATags);
        protected List<String>
        getLinkText(
                String text
            if (text == null)
                throw new NullPointerException("null text");
            Matcher matcher = tagPattern.matcher(text);
            ArrayList<String> linkList = new ArrayList<String>();
            while (matcher.find()){
                String link = text.substring(matcher.start(), matcher.end());
                link = link.replaceAll(matchHREFPre, "");
                link = link.replaceAll(matchHREFPost, "");
                linkList.add(link);
            return linkList;
        }Here is a trace of the exception
    Parsing error scanning site http://www.amazon.com
    Error parsing http://www.amazon.com/exec/obidos/ASIN/0201752808/xeo
    Caused by java.lang.StackOverflowError
    java.lang.StackOverflowError
            at java.util.regex.Pattern$Branch.match(Pattern.java:3998)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4052)
            at java.util.regex.Pattern$LazyLoop.match(Pattern.java:4241)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4111)
            at java.util.regex.Pattern$BranchConn.match(Pattern.java:3962)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3314)
            at java.util.regex.Pattern$Branch.match(Pattern.java:3998)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4052)
            at java.util.regex.Pattern$LazyLoop.match(Pattern.java:4241)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4111)
            at java.util.regex.Pattern$BranchConn.match(Pattern.java:3962)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3314)
            at java.util.regex.Pattern$Branch.match(Pattern.java:3998)
          ...

    Never do this in a regex: "(.|\n)"  // WRONG If you want to match any character including line separators, use the dot in DOTALL mode: "(?s)." If there are characters you don't want to match, you can use a negated character class. In this case, you probably don't want to match angle brackets, so you could use this: "[^<>]" The way you're doing it (alternation) is extremely inefficient. Also, you aren't allowing for other kinds of line separator, like "\r\n" (DOS) and "\r" (older Mac OS). But if you do it the right way, you don't need to worry about that.

  • Str.replace(regex,func): Is func guaranteed to be called from left to right in str?

    Suppose the global pattern regex is found in str at indexes 14, 82, 113, and 129.
    Could invocation 1 through 4 sequentially of func correlate to (say) 113, 82, 129, 14, or would it always be in order from left to right.

    Thanks for reporting the problem!
    This looks like a compiler bug, I think an artifact of creating a helper function for the debugger for the default argument.
    I have filed bug 18505648 for you.

  • Porting issues with boost::regex when going from CS6 to CC2014 using Xcode

    I have a working project in CS6 that uses the boost::regex framework that I'm having problems porting into CC2014.
    I ported this project by using Dolly to create a new project, then coping the old source files across, finally updating the various out dated InDesign API calls that appeared when I compiled. For the use of regular expressions I added the debug and release builds of the boost_regex.framework to the respective targets.
    Now, for the debug build the new CC2014 projects builds happily. But when I switch to the release build I get a few linker errors. They are all something like:
    Undefined symbols for architecture x86_64:
    "boost::re_detail::get_mem_block()", referenced from:
    boost::re_details::perl_matcher<__gnu_cxx::__normal_iterator<char const *, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const *, std::string> > >, boost::regex::regex_traits<char, boost::cpp_regex_traits<char> > >::find_imp() in SbRegex.o
    etc.
    I did a bit of reading through the boost header files. The odd thing is that the "get_mem_block()" appears to be defined for the pre-processor option BOOST_REGEX_NON_RECURSIVE, while in the project settings for BOOST_PREPROCESSOR_DEFINITIONS contains BOOST_REGEX_RECURSIVE. These two settings are mutually exclusive and there's pre-processor logic that blocks having both cases defined at once.
    This recursive option is used to control how memory is used while processing a regular expression, so seeing a get_mem_block() call (other link errors involve a call to put_mem_block) sort of makes sense being calls that look like something to do with memory.
    I'm trying to figure out why debug builds, but release build fails. Does this problem look familiar to anyone? Anyone have any suggestions to try to fix it?

    Thanks for the reply, Bartok, but those didn't seem to work for me. Maybe I applied them incorrectly as that thread was for the Win platform and not Xcode and I might have translated the solution poorly.
    Basically I went to the "Release_Cocoa64" target, and scrolled down the "Build Settings" page. I then edited the BOOST_PREPROCESSOR_DEFINITIONS field.
    First I tried just appending BOOST_SYSTEM_NO_DEPRECATED.
    Second I thought that this might be a macro of some sort so I tried $(BOOST_SYSTEM_NO_DEPRECATED).
    Finally, I deleted all the previous values and added "BOOST_ALL_DYN_LINK BOOST_REGEX_USE_CPP_LOCALE BOOST_REGEX_RECURSIVE BOOST_HAS_ICU=1 BOOST_ FILESYSTEM_VERSION=3 BOOST_CHRONO_HEADER_ONLY BOOST_SIGNALS_NO_DEPRECATION_WARNING".
    As you might guess from the experimentation I got none of these to work. The error that I was getting has remained exactly the same.
    One difference that I assumed between the Win and Xcode version is that Win separates the values with a semi-colon whereas Xcode separates with a space.
    My only other thought is maybe I edited the wrong field. Is BOOST_PREPROCESSOR_DEFINITIONS the one?
    As a final comment, the thread you gave me and my issue really comparable? I have other projects that don't use the boost::regex libraries and they build and run without issue. It's only when I try to use boost's regular expressions in a release build that I get problems when linking (debug build is still fine).
    Also the link error looks different. The thread that you gave me points at "boost::system::error_category" as not being resolved, while I have problems resolving "boost::re_detail::get_mem_block".
    I don't seem to have problems with basic boost - just the regular expression stuff.

  • Major crawler issues - removal of trailing slashes from URLs and (seemingly) poor regex implementation

    I've been suffering from two issues when setting up a crawl of an intranet website hosted on a proprietary web CMS using SharePoint 2010 Search. The issues are:
    1: The crawler appears to remove trailing slashes from the end of URLs.
    In other words, it turns http://mysite.local/path/to/page/ into http://mysite.local/path/to/page. The CMS can cope with this as it automatically forwards requests for http://mysite.local/path/to/page to http://mysite.local/path/to/page/ -
    but every time it does this it generates a warning in the crawl - one of the "URL was permanently moved" warnings. The URL hasn't been moved, though, the crawler has just failed to record it properly. I've seen a few posts about this in various places,
    all of which seem to end without resolution, which is particularly disappointing given that URLs in this format (with a trailing slash) are pretty common. (Microsoft's own main website has a few in links on its homepage - http://www.microsoft.com/en-gb/mobile/
    for instance).
    The upshot of this is that a crawl of the site, which has about 50,000 pages, is generating upwards of 250,000 warnings in the index, all apparently for no reason other than the crawler changes the address of all the pages it crawls? Is there a fix for this?
    2: The Regex implementation for crawl rules does not allow you to escape a question mark
    ... despite what it says
    here: I've tried and tested escaping a question mark in a url pattern by surrounding it in square brackets in the regex, i.e.: [?] but regardless of doing so, any URL with a question mark in just falls right through the rule. As soon as you remove the 'escaped'
    (i.e. seemingly not actually escaped at all) question mark from the rule, and from the test URL pattern, the rule catches, so it'd definitely not escaping it properly using the square brackets. The more typical regex escape pattern (a backslash before the
    character in question) doesn't seem to work, either. Plus neither the official documentation on regex patterns I've been able to find, nor the book I've got about SP2010 search, mention escaping characters in SP2010 crawl rule regexes at all. Could it be that
    MS have released a regex implementation for matching URL patterns that doesn't account for the fact that ? is a special character in both regex and in URLs?
    Now I could just be missing something obvious and would be delighted to be made to look stupid by someone giving me an easy answer that I've missed, but after banging my head against this for a couple of days, I really am coming to the conclusion that Microsoft
    have released a regex implementation for a crawler that doesn't work with URL patterns that contain a question mark. If this is indeed the case, then that's pretty bad, isn't it? And we ought to expect a patch of some sort? I believe MS are supporting SP2010
    until 2020? (I'd imagine these issues are fixed in 2013 Search, but my client won't be upgrading to that for at least another year or two, if at all).
    Both these issues mean that the crawl of my client's website is taking much longer, and generating much more data, than necessary. (I haven't actually managed to get to the end of a full crawl yet because of it... I left one running overnight and I just
    hope it has got to the end. Plus the size of the crawl db was 11GB and counting, most of that data being pointless warnings that the crawler appeared to be generating itself because it wasn't recording URLs properly). This generation of pointless mess
    is also going to make the index MUCH harder to maintain. 
    I'm more familiar with maintaining crawls in Google systems which have much better regex implementations - indeed (again, after two days of banging my head against this) I'd almost think that the regex implementation in 2010 search crawl rules was cobbled
    together at the last minute just because the Google Search Appliance has one. If so (and if I genuinely haven't missed something obvious - which I really hope I have) I'd say it wasn't worth Microsoft bothering because the one they have released appears to
    be entirely unfit for purpose?
    I'm sure I'm not the first person to struggle with these problems and I hope there's an answer out there somewhere (that isn't just "upgrade to 2013")?
    I should also point out that my client is an organisation with over 3000 staff, so heaven knows how much they are paying MS for their Enterprise Agreement. Plus I pay MS over a grand a year in MSDN sub fees etc, so (unless I'm just being a numpty) I would
    expect a higher standard of product than the one I'm having to wrestle with at the moment.

    Hi David,
    as i know in sharepoint 2010 crawl there is a rule to include or exclude the URL that using '?' characters, if i may know have you implemented the rule?
    In the Crawl Configuration section, select one of the following options:
    Exclude all items in this path. Select this option if you want to exclude all items in the specified path from crawls. If you select this option, you can refine the exclusion by selecting the following:
    Exclude complex URLs (URLs that contain question marks (?)). Select this option if you want to exclude URLs that contain parameters that use the question mark (?) notation.
    Include all items in this path. Select this option if you want all items in the path to be crawled. If you select this option, you can further refine the inclusion by selecting any combination of the following:
    Follow links on the URL without crawling the URL itself. Select this option if you want to crawl links contained within the URL, but not the starting URL itself.
    Crawl complex URLs (URLs that contain a question mark (?)). Select this option if you want to crawl URLs that contain parameters that use the question mark (?) notation.
    Crawl SharePoint content as HTTP pages. Normally, SharePoint sites are crawled by using a special protocol. Select this option if you want SharePoint sites to be crawled as HTTP pages instead. When the content is crawled by using the HTTP
    protocol, item permissions are not stored.
    for the trailing slash issue, may i have your latest cumulative update or your sharepoint database number? as i remember there was a fix on SP1 + june update regarding trailing slash, but not quite sure if the symptoms are the same with your environment.
    Sharepoint may use sharepoint connector regarding regex, but older regex may not able to have a capability to filter out the parameters so, a modification regarding the trailing slash may happend.
    please let us know your feedback.
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Regex: Remove Date from File Names Sitewide

    I'm trying to avoid  hundreds of 301 redirects across my site. I have two kinds of links that need a regex search string which will simply remove numbers that precede text within html files.
    The existing .html files are named with text only (e.g., name.html), whereas the .jpg files have the date and text (e.g., 130415name.jpg). But the new html engine I am using creates files named like the .jpg files (e.g., 130415name.html).
    I can strip the numbers out of file names in Name Munger (Strip Characters > Characters: 0123456789).
    Now I need a regex search string that will strip the same characters within the html files.
    The changes would look like this:
    1.
    Before:
    <ul>
    <li class="previous"> <a class="paginationLinks detailText" href="../content/090914name.html">Previous</a> </li>
    <li class="index"> <a href="../index_4.html" class="detailLinks detailText">Index</a> </li>
    <li class="next"> <a class="paginationLinks detailText" href="../content/090125name.html">Next</a> </li>
    </ul>
    After:
    <ul>
    <li class="previous"> <a class="paginationLinks detailText" href="../content/name.html">Previous</a> </li>
    <li class="index"> <a href="../index_4.html" class="detailLinks detailText">Index</a> </li>
    <li class="next"> <a class="paginationLinks detailText" href="../content/name.html">Next</a> </li>
    </ul>
    2.
    Before:
    onclick="window.location.href='content/020922name.html'"
    After:
    onclick="window.location.href='content/name.html'"
    What is the regex search string for these examples (any numbers preceding any letters preceding .html)?

    Set the Search option to Source Code
    In the Find field:
    (content/)\d{6}(\w+\.html)
    In the Replace field:
    $1$2
    Select the "Use regular expression" checkbox.

  • Multiple replacements from an input file with 1.4 Regex

    hi,
    i'm trying to make multiple replacments to a source file <source> using a second input file <patterns> to hold the regex's. the problem i'm having is that the output file only makes the last replacement listed in the input file. Example if the input file is
    a#123
    b#456
    only b is changed to 456 and a remains.
    the second debug i've got shows that all the replacements are in memory, but i'm not sure how to write them all to the file.
    the syntax is Java MyPatternMatcher <source> <patterns>
    import java.util.regex.*;
    import java.io.*;
    import java.util.*;
    public class MyPatternResolver {
         private File patternFile;
         private File sourceFile;
         private Vector patterns = new Vector();
         public MyPatternResolver(String sourceFile, String patternFile) {
              this.sourceFile = new File(sourceFile);
              this.patternFile = new File(patternFile);
              loadPatterns();
              resolve();
         private void loadPatterns() {
              // read in each line if File
              FileReader fileReader = null;
              try {
                   fileReader = new FileReader(patternFile);
              } catch(FileNotFoundException fnfe) {
                   fnfe.printStackTrace();
              BufferedReader reader = new BufferedReader(fileReader);
              String s = null;
              String[] strArr = new String[2];
              try {
                   while((s = reader.readLine()) != null) {
                        StringTokenizer tokenizer = new StringTokenizer(s, "#");
                        for (int i =0; i < 2; i++) {
                             strArr[i] = tokenizer.nextToken();
                             //Debugging Info
                             System.out.println("Token Value " + i + " = " + strArr);
                             //End Debugging Info
                        patterns.add(new PatternResolver(strArr[0], strArr[1], sourceFile));
              } catch(IOException ioe) {
                        ioe.printStackTrace();
         private void resolve() {
              Iterator iterator = patterns.iterator();
              while(iterator.hasNext()) {
                   PatternResolver pr = (PatternResolver) iterator.next();
                   pr.resolve();
         public static void main(String[] args) {
              MyPatternResolver mpr = new MyPatternResolver(args[0], args[1]);
         public class PatternResolver {
              private String match, replace;
              private File source;
         public PatternResolver(String s1, String s2, File f) {
              this.match = s1;
              this.replace = s2;
              this.source = f;
         public File resolve() {
              File fout = null;
              try {
         //Create a file object with the file name in the argument:
         fout = new File(sourceFile.getName() + "_");
         //Open and input and output stream
         FileInputStream fis = new FileInputStream(sourceFile);
         FileOutputStream fos = new FileOutputStream(fout);
         BufferedReader in = new BufferedReader(new InputStreamReader(fis));
         BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));
         // The find and replace statements
         Pattern p = Pattern.compile(match);
                   Matcher m = p.matcher(replace);
                   //Debugging Info
                   System.out.println("Match value = " + match + " Replace value = " + replace);
                   //Debugging Complete
                   String aLine = null;
                   while((aLine = in.readLine()) != null) {
                   m.reset(aLine);
                   //Make replacements
                   String result = m.replaceAll(replace);
                   out.write(result);
              out.newLine();
                   in.close();
                   out.close();
              } catch (Exception e) {
                   e.printStackTrace();
    return fout;

    If your aim is to learn about regex, then its okay.
    Otherwise you might want to check the utility "sed" (stream editor) which does something similar what you are up to. It is a POSIX (.i.e. UNIX) utility, but it is available (in several versions) for other platforms (including Windows) too. (Cf. Cygnus or Mingw).

  • Generate best matching regex/rule from string set

    does there exist a tool which:
    given a set of strings, will parse those strings and output a the simplest possible regex which matches those strings
    or
    does there exist a tool which, given a regex, can output a simplified(bonus points for optimal) version of the same regex
    ?

    i should rephrase, simplest regex that matches a set
    of strings, and nothing more. i can make some for the
    set: "doggy, dogma, man" -> doggy|dogma|man but if
    my set of strings is very large it might be better to
    try to write the regex like this: dog(gy|ma)|man
    so, the real problem is that i have several sets of
    500+ strings, i need to write a short/efficient regex
    to match them.What do you need it for?

  • Porting regex from Perl

    I'm trying to port some Perl5 code to Java 5.0. I have some issues with the following regex (^|>):
    Perl:
    $_ = ">";
    s/(^|>)/$1m/g'
    print "$_\n";
    Java:
    String s = ">";
    Pattern p = Pattern.compile( "(^|>)" );
    Matcher m = p.matcher( s );
    System.out.println (m.replaceAll( "$1m" ));
    Perl gives me "m>m" while Java (and some other regex implementations I've tried vim, javascript) gives me "m>". It seems that Perl's implementation is correct. It finds the beginning of a line and then it finds more sign. Two matches.
    Any ideas how would I make Java regex behave identical to Perl here?
    thanks
    i5mast

    i5mast wrote:
    String s = ">xxx>xxx>";
    Pattern p = Pattern.compile( "(?<=^|>)" );
    Matcher m = p.matcher( s );
    System.out.println (m.replaceAll( "m" ));m>xxx>mxxx>m
    Not exactly like m>mxxx>mxxx>m.!!!!!!!! I get
    m>mxxx>mxxx>mon 1.6.0_23 and on the beta versions of 1.7 .
    Edited by: sabre150 on 25-Feb-2011 14:45
    On 1.5 I get
    m>xxx>mxxx>mso you must be using 1.5. I can get the desired result for 1.5,1.6 and 1.7 using
           String s = ">xxx>xxx>";
            Pattern p = Pattern.compile("(?<=>)|(?<=^)");
            Matcher m = p.matcher(s);
            System.out.println(m.replaceAll("m"));

  • Extract records from file using RegEx

    Hi guys,
    I was wondering if there's a way to extract records from a text file using regular expressions matching groups in Endeca Integrator.
    I have several XML files and I have mapped and extracted records from them using XML Reader component, but I need to preserve the tags of mapped elements. For example, if I have the following XML:
    <Msg><Para>Some text. <Emphasis>More text</Emphasis><Para></Msg>
    mapping Msg element to an output cloverField will return "Some text. More text". I need to preserve tags, so I need an output like: "<Msg><Para>Some text. <Emphasis>More text</Emphasis><Para></Msg>",
    I don't know if there's a way to accomplish this by modifying the setting of the XML Reader component, but I was thinking of using regular expressions to solve this. Unfortunately, I can't find a way to do it by using the built-in components in Integrator.
    The final solution is do it programmatically without using Integrator, but I want to know if I'm missing something.
    Thanks in advance.

    This will get the name and extension in separate variables
    set vTheFile to (choose file) as text
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ":"}
    set vPath to (vTheFile's text items 1 thru -2 as text)
    -- Add this for the file name
    set vFile to vTheFile's text item -1
    -- This will get the name and extension as  seperate items
    set AppleScript's text item delimiters to "."
    set {vFileName, VfileNameExtension} to {text item 1 of vFile, text item 2 of vFile}
    set AppleScript's text item delimiters to TempTID
    display dialog "Path is: " & vPath & return & return & "File is: " & vFile & return & "File name is: " & vFileName & return & "Extension is : " & VfileNameExtension
    (but I think I am done now)

  • Unable to Access Company LAN via VPN

    Hello,
    I have a ASA 5505 that I have been using to test run the IPSec VPN connection after studying the different configs and running through the ASDM I keep getting the same issue that I can't receive any traffic.
    The company LAN is on a 10.8.0.0 255.255.0.0 network, I have placed the VPN clients in 192.168.10.0 255.255.255.0 network, the 192 clients can't talk to the 10.8 network.
    On the Cisco VPN client I can see lots of sent packets but none received.
    I think it could be to do with the NAT but from the examples I have seen I believe it should work.
    I have attached the complete running-config, as I could well have missed something.
    Many Thanks for any help on this...
    FWBKH(config)# show running-config           
    : Saved
    ASA Version 8.2(2)
    hostname FWBKH
    domain-name test.local
    enable password XXXXXXXXXXXXXXX encrypted
    passwd XXXXXXXXXXXXXXXX encrypted
    names
    name 9.9.9.9 zscaler-uk-network
    name 10.8.50.0 inside-network-it
    name 10.8.112.0 inside-servers
    name 17.7.9.10 fwbkh-out
    name 10.8.127.200 fwbkh-in
    name 192.168.10.0 bkh-vpn-pool
    interface Vlan1
    nameif inside
    security-level 100
    ip address fwbkh-in 255.255.0.0
    interface Vlan2
    nameif outside
    security-level 0
    ip address fwbkh-out 255.255.255.248
    interface Vlan3
    nameif vpn
    security-level 100
    ip address 192.168.10.1 255.255.255.0
    interface Ethernet0/0
    interface Ethernet0/1
    switchport access vlan 2
    interface Ethernet0/2
    shutdown
    interface Ethernet0/3
    shutdown
    interface Ethernet0/4
    shutdown
    interface Ethernet0/5
    shutdown
    interface Ethernet0/6
    shutdown    
    interface Ethernet0/7
    shutdown
    banner login Trespassers will be Shot, Survivors will be Prosecuted!!!!
    banner motd Trespassers will be Shot, Survivors will be Prosecuted!!!!
    banner asdm Trespassers will be Shot, Survivors will be Prosecuted!!!!
    boot system disk0:/asa822-k8.bin
    ftp mode passive
    dns server-group DefaultDNS
    domain-name test.local
    object-group service DM_INLINE_TCP_2 tcp
    port-object eq www
    port-object eq https
    object-group service DM_INLINE_UDP_1 udp
    port-object eq 4500
    port-object eq isakmp
    object-group protocol DM_INLINE_PROTOCOL_1
    protocol-object ip
    protocol-object icmp
    protocol-object udp
    access-list inside_access_in extended permit tcp 10.8.0.0 255.255.0.0 any object-group DM_INLINE_TCP_2 log warnings inactive
    access-list inside_access_in extended permit ip inside-network-it 255.255.255.0 any inactive
    access-list inside_access_in extended permit tcp 10.8.0.0 255.255.0.0 host zscaler-uk-network eq www
    access-list inside_access_in extended permit ip inside-servers 255.255.255.0 any log warnings
    access-list USER-ACL extended permit tcp 10.8.0.0 255.255.0.0 any eq www
    access-list USER-ACL extended permit tcp 10.8.0.0 255.255.0.0 any eq https
    access-list outside_nat0_outbound extended permit ip bkh-vpn-pool 255.255.255.0 10.8.0.0 255.255.0.0
    access-list outside_access_in extended permit udp any host fwbkh-out object-group DM_INLINE_UDP_1 log errors inactive
    access-list inside_nat0_outbound extended permit object-group DM_INLINE_PROTOCOL_1 10.8.0.0 255.255.0.0 any
    access-list inside_nat0_outbound_1 extended permit ip 10.8.0.0 255.255.0.0 bkh-vpn-pool 255.255.255.0
    access-list UK-VPN-USERS_splitTunnel extended permit ip 10.8.0.0 255.255.0.0 bkh-vpn-pool 255.255.255.0
    access-list UK-VPN-USERS_splitTunnel extended permit ip inside-servers 255.255.255.0 bkh-vpn-pool 255.255.255.0
    pager lines 24
    logging enable
    logging asdm informational
    mtu inside 1500
    mtu outside 1500
    mtu vpn 1500
    ip local pool UK-VPN-POOL 192.168.10.10-192.168.10.60 mask 255.255.255.0
    no failover
    icmp unreachable rate-limit 1 burst-size 1
    asdm image disk0:/asdm-631.bin
    no asdm history enable
    arp timeout 14400
    nat-control  
    global (inside) 1 interface
    global (outside) 1 interface
    nat (inside) 0 access-list inside_nat0_outbound_1
    nat (inside) 1 10.8.0.0 255.255.0.0 dns
    nat (outside) 0 access-list outside_nat0_outbound outside
    access-group inside_access_in in interface inside
    access-group outside_access_in in interface outside
    route outside 0.0.0.0 0.0.0.0 17.7.9.10 1
    timeout xlate 3:00:00
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
    timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
    timeout tcp-proxy-reassembly 0:01:00
    dynamic-access-policy-record DfltAccessPolicy
    aaa authentication ssh console LOCAL
    http server enable
    http 10.8.0.0 255.255.0.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server enable traps snmp authentication linkup linkdown coldstart
    crypto ipsec transform-set ESP-AES-256-MD5 esp-aes-256 esp-md5-hmac
    crypto ipsec transform-set ESP-DES-SHA esp-des esp-sha-hmac
    crypto ipsec transform-set ESP-DES-MD5 esp-des esp-md5-hmac
    crypto ipsec transform-set ESP-AES-192-MD5 esp-aes-192 esp-md5-hmac
    crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
    crypto ipsec transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
    crypto ipsec transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac
    crypto ipsec transform-set ESP-AES-192-SHA esp-aes-192 esp-sha-hmac
    crypto ipsec transform-set ESP-AES-128-MD5 esp-aes esp-md5-hmac
    crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
    crypto ipsec security-association lifetime seconds 28800
    crypto ipsec security-association lifetime kilobytes 4608000
    crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set pfs group1
    crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set transform-set ESP-AES-128-SHA ESP-AES-128-MD5 ESP-AES-192-SHA ESP-AES-192-MD5 ESP-AES-256-SHA ESP-AES-256-MD5 ESP-3DES-SHA ESP-3DES-MD5 ESP-DES-SHA ESP-DES-MD5
    crypto map outside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
    crypto map outside_map interface outside
    crypto ca trustpoint BKHFW
    enrollment self
    subject-name CN=FWBKH
    crl configure
    crypto ca certificate chain BKHFW
    certificate fc968750
        308201dd 30820146 a0030201 020204fc 96875030 0d06092a 864886f7 0d010105
        05003033 310e300c 06035504 03130546 57424b48 3121301f 06092a86 4886f70d 
        ccc6f3cb 977029d5 df42515f d35c0d96 798350bf 7472725c fb8cd64d 514dc9cb
        7f05ffb9 b3336388 d55576cc a3d308e1 88e14c1e 8bcb13e5 c58225ff 67144c53 f2
      quit
    crypto isakmp enable outside
    crypto isakmp policy 10
    authentication pre-share
    encryption aes-256
    hash sha
    group 2
    lifetime 86400
    crypto isakmp policy 30
    authentication pre-share
    encryption 3des
    hash sha
    group 2
    lifetime 86400
    telnet timeout 5
    ssh 10.8.0.0 255.255.0.0 inside
    ssh timeout 30
    ssh version 2
    console timeout 0
    dhcpd auto_config outside
    threat-detection basic-threat
    threat-detection statistics access-list
    no threat-detection statistics tcp-intercept
    webvpn
    group-policy UK-VPN-USERS internal
    group-policy UK-VPN-USERS attributes
    dns-server value 10.8.112.1 10.8.112.2
    vpn-tunnel-protocol IPSec svc
    split-tunnel-policy tunnelspecified
    split-tunnel-network-list value UK-VPN-USERS_splitTunnel
    default-domain value test.local
    address-pools value UK-VPN-POOL
    group-policy DfltGrpPolicy attributes
    vpn-tunnel-protocol webvpn
    username admin password XXXXXXXXXXXXXXXXX encrypted privilege 15
    username karl password XXXXXXXXXXXXXXX encrypted privilege 15
    tunnel-group UK-VPN-USERS type remote-access
    tunnel-group UK-VPN-USERS general-attributes
    address-pool UK-VPN-POOL
    default-group-policy UK-VPN-USERS
    tunnel-group UK-VPN-USERS ipsec-attributes
    pre-shared-key *****
    tunnel-group IT-VPN type remote-access
    tunnel-group IT-VPN general-attributes
    address-pool UK-VPN-POOL
    default-group-policy UK-VPN-USERS
    tunnel-group IT-VPN ipsec-attributes
    pre-shared-key *****
    class-map ALLOW-USER-CLASS
    match access-list USER-ACL
    class-map type inspect http match-all ALLOW-URL-CLASS
    match not request header from regex ALLOW-ZSGATEWAY
    class-map inspection_default
    match default-inspection-traffic
    policy-map type inspect dns preset_dns_map
    parameters
      message-length maximum client auto
      message-length maximum 512
    policy-map type inspect http ALLOW-URL-POLICY
    parameters
    class ALLOW-URL-CLASS
      drop-connection
    policy-map global_policy
    class inspection_default
      inspect dns preset_dns_map
      inspect ftp
      inspect h323 h225
      inspect h323 ras
      inspect netbios
      inspect rsh
      inspect rtsp
      inspect skinny 
      inspect esmtp
      inspect sqlnet
      inspect sunrpc
      inspect tftp
      inspect sip 
      inspect xdmcp
      inspect ip-options
    policy-map ALLOW-USER-URL-POLICY
    class ALLOW-USER-CLASS
      inspect http
    service-policy global_policy global
    service-policy ALLOW-USER-URL-POLICY interface inside
    prompt hostname context
    call-home
    profile CiscoTAC-1
      no active
      destination address http https://tools.cisco.com/its/service/oddce/services/DDCEService
      destination address email [email protected]
      destination transport-method http
      subscribe-to-alert-group diagnostic
      subscribe-to-alert-group environment
      subscribe-to-alert-group inventory periodic monthly
      subscribe-to-alert-group configuration periodic monthly
      subscribe-to-alert-group telemetry periodic daily
    Cryptochecksum:00725d3158adc23e6a2664addb24fce1
    : end

    Hi Karl,
    Please make the following changes:
    ip local pool VPN_POOL_UK_USERS 192.168.254.1-192.168.254.254
    access-list inside_nat0_outbound_1 extended permit ip 10.8.0.0 255.255.0.0 192.168.254.0 255.255.255.0
    no nat (outside) 0 access-list outside_nat0_outbound outside
    access-list UK-VPN-USERS_SPLIT permit 10.8.0.0 255.255.0.0
    group-policy UK-VPN-USERS attributes
    split-tunnel-network-list value UK-VPN-USERS_SPLIT
    no access-list UK-VPN-USERS_splitTunnel extended permit ip 10.8.0.0 255.255.0.0 bkh-vpn-pool 255.255.255.0
    no access-list UK-VPN-USERS_splitTunnel extended permit ip inside-servers 255.255.255.0 bkh-vpn-pool 255.255.255.0
    access-list inside_access_in extended permit ip 10.8.0.0 255.255.255.0 192.168.254.0 255.255.255.0
    management-access inside
    As you can see, I did create a new pool, since you already have an interface in the 192.168.10.0/24 network, which does affect the VPN clients.
    Once you are done, connect the client and try:
    ping 10.8.127.200
    Does it work?
    Try to ping other internal IPs as well.
    Let me know how it goes.
    Portu.
    Please rate any helpful posts
    Message was edited by: Javier Portuguez

Maybe you are looking for

  • "Unable to Check Out File Error" Message

    I'm new to using Adobe products, so forgive me if this is a dumb question! My graphic designer sent me a INDD file to edit the text in and when I try to open it in both InDesign and InCopy, I receive an "Unable to Check Out this File" error message.

  • How to populate table editor which has dropdown by index in a column

    Hi Experts, I have a table editor with 3 columns. Column 1. DD By Index - Subjects Column2: marks ( input field ) column3: Result ( text view) On an action of button on top of the view, i am getting the data for column2 and 3 and populating the node

  • ITunes says it needs to install rosetta

    All of the sudden, iTunes won't launch and Software Update says it needs to install Rosetta.  Never had to do that before.  Anyone know what's going on?  Could this be an issue created from the most recent update?

  • What do I do if there is a print head error 059?

    Feeling frustrated.  My printer has worked just fine.  Suddenly today I went to change the yellow ink.  When I turned around to put a new ink catridge in, the machine had gone completely off--- no lights, nothing.  After unplugging and plugging the p

  • I started a creative cloud student membership but Premiere Pro and After Effects are not in the app

    I started a creative cloud student membership but Premiere Pro and After Effects are not in the app and won't download from the adobe website, all that happens is that the creative cloud app opens and sends me to the list of programs available for do