Search Results

Search found 4071 results on 163 pages for 'preg split'.

Page 2/163 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Difference of answers while using split function in Ruby

    - by N L
    Given the following inputs: line1 = "Hey | Hello | Good | Morning" line2 = "Hey , Hello , Good , Morning" file1=length1=name1=title1=nil Using ',' to split the string as follows: file1, length1, name1, title1 = line2.split(/,\s*/) I get the following output: puts file1,length1,name1,title1 >Hey >Hello >Good >Morning However, using '|' to split the string I receive a different output: file1, length1, name1, title1 = line2.split(/|\s*/) puts file1,length1,name1,title1 >H >e >y Both the strings are same except the separating symbol (a comma in first case and a pipe in second case). The format of the split function I am using is also the same except, of course, for the delimiting character. What causes this variation?

    Read the article

  • Force Juniper-network client to use split routing

    - by craibuc
    I'm using the Juniper client for OSX ('Network Connect') to access a client's VPN. It appears that the client is configured to not use split-routing. The client's VPN host is not willing to enable split-routing. Is there a way for me to over-ride this configuration or do sometime on my workstation to get the non-client network traffic to by-pass the VPN? This wouldn't be a big deal, but none of my streaming radio stations (e.g. XM) work will connected to their VPN. Apologies for any inaccuracies in the terminology. ** edit ** The Juniper client changes my system's resolve.conf file from: nameserver 192.168.0.1 to: search XXX.com [redacted] nameserver 10.30.16.140 nameserver 10.30.8.140 I've attempted to restore my preferred DNS entry to the file $ sudo echo "nameserver 192.168.0.1" >> /etc/resolv.conf but this results in the following error: -bash: /etc/resolv.conf: Permission denied How does the super-user account not have access to this file? Is there a way to prevent the Juniper client from making changes to this file?

    Read the article

  • Split big Apache log to folder structure

    - by Dough
    I just changed my Apache log behavior because it was making me having very BIG files... So I now use cronolog to split my logs to log/httpd/2012/11/access_2012.11.30.log for exemple, pattern : %Y/%m/access_%Y.%m.%d.log I now want to split my old 42GB file to the same structure but really don't know how to do that efficiently. I tried some simple commands with cat, egrep, awk... but really don't know how to handle all that in a more powerful script. Here is how the log looks like : x.x.237.134 - - [08/Apr/2011:14:43:09 +0200] "GET... x.x.50.15 - - [08/Apr/2011:14:43:09 +0200] "GET... [...] x.x.254.19 - - [28/Feb/2012:15:24:48 +0100] "GET... So I need for yeah line to get : year %Y (ex. 2012) month %m (ex. 11) day %d And to push out the entire line to : %Y/%m/access_%Y.%m.%d.log Can someone give me clues to get that working ? Thanks a lot for your interest.

    Read the article

  • Need help finding a program to split PDFs based on text in specific areas

    - by Sean
    I reeeeally need help with this. I work for a University in the admissions office and we get large PDFs of every document that an applicant uploads to us. What I need to do is split these PDFs into separate documents. Each of the separate documents has a head at the top of what type of document it is (Statement of Purpose, Transcript, etc). I found a program a few weeks ago that at first seemed to work great (A-PDF Splitter). It would look for every type of document in a combined PDF (eg. Statement of Purpose), and if it saw that heading it would create a new PDF named "ORIGINALFILENAME-Statement of Purpose". I soon discovered though that the program breaks for no reason on certain PDFs, and I have to take the time to take that PDF out of the queue and start the splitting over again (and we get 250 a day). I contacted their support and they basically told me I was SOL. So please, if you can find me a program to split PDFs into smaller PDFs based on if it finds particular text in a region, then I would be forever in dept to you. If I don't find one soon then I'm going to be spending the entire day splitting PDFs by hand and my boss isn't going to be happy.

    Read the article

  • file split tool for Windows

    - by George2
    Hello everyone, I am using Windows 7 and I have a big text file (log file) which needs to be splitted into small files. Any good tool to use? I prefer to use line based split tool if available. It is better free and easy to use. thanks in advance, George

    Read the article

  • Split (parts of) image into several smaller (same size) pieces non-manually

    - by hlovdal
    If I have an image with a table containing several rows, say like the periodic table: Are there any tool I can use to split this into one smaller image with the H He row, another image for the Li Be ... Ne row, etc? The tool does not have to detect the row borders by itself, specifying a start offset + row height in pixels is ok. Manually selecting and cutting/copying in gimp is not an option, I have way to many rows to process.

    Read the article

  • Split DNS clarification

    - by RidableCthulu
    I need some clarification if I understood this correctly. I've been reading about Active Directory and naming my domain, and the reason Microsoft didn't suggest using external public domain was DNS Split. If I understood correctly (and please correct me if I did) in this case I have two Domain Name Servers, both doing the same job, but one of them is internal (in my company i.e.) and the other is a public one. Did I misunderstand this and if I did could somebody explain this to me? I hope this question is not too broad for this site! Cheers.

    Read the article

  • Remote support via VPN without split tunnel

    - by Robe Eleckers
    my title might not be very clear, but I'll explain my setup in more detail now. We have several customers (companies) that need to be remotely supported. At these customers we have servers running with our software that needs to be serviced. These servers are (almost) never connected to the internet. For this we have multiple PC's running VPN clients. These PC's run a VNC server so our service engineers can login from their home laptop remotely to these PC's and connect from there to our customer via the VPN connection on the PC. The problem is however that several customers do not allow split tunneling. That means that when we connect via VPN to such a customer the VNC connection drops. Our current workaround is using a Citrix VM which we control via XenCenter console, but it's quite slow. Are there common solutions to handle this?

    Read the article

  • How to split file on Windows 2003 using MS supported tool

    - by Rune
    Hi, Is it possible to split a large file into smaller files on Windows 2003 using a tool provided/supported/sanctioned by Microsoft? I see that there are a lot of freeware tools (various zip tools) for this task, but I need to move files off of a production server, thus would like to avoid tools I don't know if I can trust. I would much prefer some tool included in the Windows Server 2003 Resource Kit Tools or something along those lines. Does such a tool exist? Thank you.

    Read the article

  • Python: split files using mutliple split delimiters

    - by donalmg
    Hi, I have multiple CSV files which I need to parse in a loop to gather information. The problem is that while they are the same format, some are delimited by '\t' and others by ','. After this, I want to remove the double-quote from around the string. Can python split via multiple possible delimiters? At the minute, I can split the line with one by using: f = open(filename, "r") fields = f.readlines() for fs in fields: sf = fs.split('\t') tf = [fi.strip ('"') for fi in sf] Any suggestions are welcome.

    Read the article

  • SQL Split function.

    - by Wardy
    Hi guys, I'm looking for a way to do this ... SELECT FirstName, LastName, Split(AddressBlock, ' ', 1), Split(AddressBlock, ' ', 2), PostCode FROM Contacts The arguments I want to pass are ... The address The separator (current situation requires 2 spaces but this might be a comma or a space followed by a comma) or something else (it varies). The address part I want to return (i don't always need all parts of the split result). I seem to be able to find a few examples of splitting functions about the internet but they return a table containing the entire set of split parts. My SQL skills aren't that great so I need the answer to be ultra simple. I'm always working with nvarchar data and the function needs to be reusable.

    Read the article

  • How to split value

    - by scopus
    Hi, I want to split value. $value = "code1.code2.code3.code4(code5.code6(arg1.arg2, arg3), code7.code8)"; I want to split like this. Array ( [0] => code1 [1] => code2 [2] => code3 [1] => code4(code5.code6(arg1.arg2, arg3), code7.code8) ) I used explode('.', $value) but explode split in parentheses value. I don't want split in parentheses value. How can i do?

    Read the article

  • How to find which delimiter was used during string split (VB.NET)

    - by typoknig
    Hi all, lets say I have a string that I want to split based on several characters, like ".", "!", and "?". How do I figure out which one of those characters split my string so I can add that same character back on to the end of the split segments in question? Dim linePunctuation as Integer = 0 Dim myString As String = "some text. with punctuation! in it?" For i = 1 To Len(myString) If Mid$(entireFile, i, 1) = "." Then linePunctuation += 1 Next For i = 1 To Len(myString) If Mid$(entireFile, i, 1) = "!" Then linePunctuation += 1 Next For i = 1 To Len(myString) If Mid$(entireFile, i, 1) = "?" Then linePunctuation += 1 Next Dim delimiters(3) As Char delimiters(0) = "." delimiters(1) = "!" delimiters(2) = "?" currentLineSplit = myString.Split(delimiters) Dim sentenceArray(linePunctuation) As String Dim count As Integer = 0 While linePunctuation > 0 sentenceArray(count) = currentLineSplit(count)'Here I want to add what ever delimiter was used to make the split back onto the string before it is stored in the array.' count += 1 linePunctuation -= 1 End While

    Read the article

  • Split screen in iPad

    - by AAT
    I working on a iPAD only app which requires me to split the screen such a way that: (1) there are 2 parts on the screen divided vertically (2) On the left side, user can communicate using a chat (3) On the right side, user can see continuous streaming data I am not sure (A) how can I do two tasks simultaneously (B)how to split the screen (is Split view the way to achieve both of these?) Thank you.

    Read the article

  • BIND split-view DNS config problem

    - by organicveggie
    We have two DNS servers: one external server controlled by our ISP and one internal server controlled by us. I'd like internal requests for foo.example.com to map to 192.168.100.5 and external requests continue to map to 1.2.3.4, so I'm trying to configure a view in bind. Unfortunately, bind fails when I attempt to reload the configuration. I'm sure I'm missing something simple, but I can't figure out what it is. options { directory "/var/cache/bind"; forwarders { 8.8.8.8; 8.8.4.4; }; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; }; zone "." { type hint; file "/etc/bind/db.root"; }; zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127"; }; zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; }; zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; view "internal" { zone "example.com" { type master; notify no; file "/etc/bind/db.example.com"; }; }; zone "example.corp" { type master; file "/etc/bind/db.example.corp"; }; zone "100.168.192.in-addr.arpa" { type master; notify no; file "/etc/bind/db.192"; }; I have excluded the entries in the view for allow-recursion and recursion in an attempt to simplify the configuration. If I remove the view and just load the example.com zone directly, it works fine. Any advice on what I might be missing?

    Read the article

  • How to file split at a line number

    - by superspace
    I want to split a 400k line long log file from a particular line number. For this question, lets make this an arbitrary number 300k. Is there a linux function that allows me to do this? I know split lets me split the file in equal parts either by size or line numbers but that's not what I want. I want to the first 300k in one file and the last 100k in the second file. Any help would be appreciated. Thanks!

    Read the article

  • Split String in C# without delimiter (sort of)

    - by Zach
    Hi, I want to split a string in C#.NET that looks like this: string Letters = "hello"; and put each letter (h, e, l, l, o) into an array or ArrayList. I have no idea what to use as the delimiter in String.Split(delimiter). I can do it if the original string has commas (or anything else): string Letters = "H,e,l,l,o"; string[] AllLettersArray = Letters.Split(",".ToCharArray()); But I have no idea what to use in a case with (supposedly) no delimiter. Is there a special character like Environment.Newline? Thanks.

    Read the article

  • How to split strings at specific intervals to arrays in javascript

    - by t3st
    how to split strings at specific interveals to arrays in javascript for example: split this string into 4 characters (including space and characters) this is an example should be split,numbers(123),space,characters also included to this ------> 1st array is ------> 2nd array an ------> 3rd array exam ------> 4th array ple ------> 5th array shou ------> 6th array ............ etc till..... ..ed ------> last array

    Read the article

  • Java Split not working as expected

    - by daaabears
    I am trying to use a simple split to break up the following string: 00-00000 My expression is: ^([0-9][0-9])(-)([0-9])([0-9])([0-9])([0-9])([0-9]) And my usage is: String s = "00-00000"; String pattern = "^([0-9][0-9])(-)([0-9])([0-9])([0-9])([0-9])([0-9])"; String[] parts = s.split(pattern); If I play around with the Pattern and Matcher classes I can see that my pattern does match and the matcher tells me my groupCount is 7 which is correct. But when I try and split them I have no luck.

    Read the article

  • Split string into sentences based on periods

    - by rookie
    Hi all, I have written this piece of code that splits a string and stores it in a string array:- String[] sSentence = sResult.split("[a-z]\.\s+"); However, I've added the [a-z] because I wanted to deal with some of the abbreviation problem. But then my result shows up as so:- Furthermore when Everett tried to instruct them in basic mathematics they proved unresponsiv I see that I loose the pattern specified in the split function. Its okay for me to loose the period, but loosing the last letter of the word disturbs its meaning. Could some one help me with this and in addition also could someone help me with dealing with abbreviations? Like because I split the string based on periods, I do not want to loose the abbreviations. Thanks in advance

    Read the article

  • php regex to split invoice line item description

    - by user1053700
    I am attempting to split strings like the following: An item (Item A) which may contain 89798 numbers and letters @ $550.00 4 of Item B @ $420.00 476584 of Item C, with a larger quantity and different currency symbol @ £420.00 into: array( 0 => 1 1 => "some item which may contain 89798 numbers and letters" 2 => $550.00 ); does that make sense? I am looking for a regex pattern which will split the quantity, description, and price (including symbol). the strings will always be: qty x description @ price+symbol so i assume the regex would be something like: `(match a number and only a number) x (get description letters and numbers before the @ symbol) @ (match the currency symbol and price)` How should I approach this?

    Read the article

  • php PHPExcel split Excel cell coordinate

    - by Shiro
    currently, I used PHPExcel to import excel file, there is a function $cell-getCoordinate(); I would like to ask any solution for split the cell coordinate alphabet and integer? e.g A1, A2, I need to know currently which row, and until which column. I do some research about split, but not luck for it. Any idea?

    Read the article

  • Strange, regex.split Method matches one null element

    - by dontoo
    Regex rx = new Regex(@"[+-]"); string[] substrings = rx.Split(expression); expression = "-9a3dcbh-3bca-4ab4cf-3hc" //This is the iput string I want to split that string between + or -. My VS debugger shows substring array like this: substrings[0] = null //???Why substrings[1] = 9a3dcbh substrings[2] = 3bca substrings[3] = 4ab4cf substrings[4] = 3hc Why is the first element of arry null, is it because I am matching +-, and there is no + in my input string?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >