Questions tagged [multilinestring]
236 questions
2
votes
2 answers
Finding multi-line string in PHP file
I am working on a program in which an addon needs to modify a system file.
I have a small method in which I am finding the beginning of the string in the file like this:
/**
* @param $fileName
* @param $str
*
* @return int
…

W3bGuy
- 735
- 7
- 20
2
votes
1 answer
Interpolate multiline string with correct indent
When I am trying to interpolate one multiline string into another I get wrong indentation because only the first line of substring has right indent, e.g.:
substring = <<-STRING.strip_heredoc
first line
second line
STRING
string =…

Nick Roz
- 3,918
- 2
- 36
- 57
2
votes
1 answer
Select a tag from multiline html code using preg_match_all
I want to use the php function preg_match_all to find a part of the html code to replace it by another one.
This is what I need to find:
tag{link} attr{rel="stylesheet" type="text/css" media="screen"}…

Ivano
- 72
- 6
2
votes
1 answer
split a multi-line string in C
how can I split a multi-line string in const char* array.?
Here is the input string.
const char* str = "122.123,-38.789"
"122.123,-39.78";
I need to get two string from this.
str1 = "122.123,-38.789";
str2 =…

rkm
- 892
- 2
- 16
- 32
2
votes
8 answers
Simple way templating multiline strings in java code
I'm often run in to the following situation: I have long multiline strings where properties must be injected - e.g. something like templating. But I don't want to inlcude a complete templating engine (like velocity or freemarker) in my projects.
How…

michael
- 16,221
- 7
- 55
- 60
2
votes
1 answer
Postgis merge and order of linestrings
I've imported a KML file in my database postgis. When I select a road I've the right result:
This is one road. There aren't a lot of rows so I could order them manually but some roads have more then 100.
So I would like to order the linestrings at…

Mirza Selimovic
- 1,669
- 15
- 18
2
votes
1 answer
How to store multiline text in SQL Server 2008 keeping track of new line in asp.net
I am developing an intranet ASP.NET web site. I am saving user comments from an asp.net multiline textbox into a SQL Server database, and display exactly as it is written by user in Gridview.
Suppose a user enter following…

nks
- 61
- 2
- 12
1
vote
4 answers
how to efficiently process string in python line by line?
I received some multi-line data via HTTP and have it in one string. I need to filter only lines containing specific keywords and write it to a file.
How do I process these individual lines without consuming excessive memory? I.e. without splitting…

user323094
- 3,643
- 4
- 21
- 30
1
vote
3 answers
How to test an interpreter using JUnit?
I am writing tests for an interpreter from some programming language in Java using JUnit framework. To this end I've created a large number of test cases most of them containing code snippets in a language under testing. Since these snippets are…

vitaut
- 49,672
- 25
- 199
- 336
1
vote
1 answer
How to capture a multi-line regex between two tags based on a match condition?
I have a text composed of text fragments delimited by "[1]" tags. I would like to use regular expressions to select (and eventually delete) those delimited fragments that do not contain asterisks.
example
[1] "Q 1 Gender * modal2"
Gender 1…

Osmel Bordiés López
- 63
- 4
1
vote
1 answer
How to detect multiline string when the start and end is a keyword?
I'm trying to get develop a syntax highlighting for such a text:
PAGE_TEXT_PARAGRAPH_START (HN 10 JUSTIFIED 0.0 4.0)
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sagittis varius nulla,
nec rhoncus erat vehicula eget. Sed suscipit…

Alessandro Perucchi
- 117
- 12
1
vote
1 answer
Regex that matches multiple new lines until finding patern
I am not very familiar to regex and I am having trouble to create a regex that solves my problem.
I want to create a regex that finds the following example: (What the regex should match is in bold)
Action type: Lorem ipsum dolor sit amet,…

Itamar Rocha Filho
- 65
- 6
1
vote
0 answers
How to display a geojson to a geomap on grafana panel
I'm using MySQL and Grafana.
I wish to display a geojson field to a geomap but impossible to select geojson format.
The contains of geojson is a MultilineString.
What is best way to create a Panel on Grafana on my country and display all my geojson…

titof ursule
- 11
- 1
1
vote
5 answers
How do I make a multi-line input in python without using a list?
I have to write a program without using list(as I still haven't learnt them) to take 10 names as the input and put them all in lower-case and then capitalize the first letter.
I came up with two programs that both work; However, there are some…

Annahita
- 47
- 4
1
vote
0 answers
Python to convert lines in an image to multilinestring
I have .png files that look something like this:
I know the x-y coordinates for the corners, so I can place it in a map (each .png normally covers an area of 50x25 meters, so it’s fairly accurate)
I would like to create multilinestring objects from…

ruben
- 21
- 4