Questions tagged [multilinestring]
236 questions
1
vote
1 answer
Java regex does not match multiline string
I am sorry I am new in Java. I need to match multiline string in Java which looks like:
meno je povinné pole
priezvisko je povinné pole
heslo je povinné pole
email je povinné pole
email nemá platný formát
musíte súhlasiť s podmienkami
And here is…

Čamo
- 3,863
- 13
- 62
- 114
1
vote
0 answers
Javascript: Strange whitespace behavior in multi-line string variable containing other embedded multi-line string variable
I'm trying to build code snippets and output them using clipboard.js. I need to preserve the whitespace in the string to maintain the code indents. I'm providing the code below in ES5 - the behavior is the same for ES6 using string literals. For…

VanAlbert
- 2,299
- 1
- 21
- 17
1
vote
2 answers
Multiline String Python Regex
I am trying to get the last number from this string from each line but my code is only able to get '25' instead. I want to get 15, 10, 5, 5, and 25.
import re
string = """
1073811-S0-A M3S FRT SUBFRAME MNT FRT INR LH 15
1073851-S0-A M3S REAR…

Dajuice911
- 11
- 2
1
vote
8 answers
Check for multi-line content in a file
I'm trying to check if a multi-line string exists in a file using common bash commands (grep, awk, ...).
I want to have a file with a few lines, plain lines, not patterns, that should exists in another file and create a command (sequence) that…

thoni56
- 3,145
- 3
- 31
- 49
1
vote
2 answers
How to write multiple lines in a file using multiline string? I really want to optimize the below code
I am using file_name.write to write multiple line considering spaces to write a file.
Code:
file_handle.write('$TTL 1h\n')
file_handle.write('@\tIN\tSOA\tns1.test.nimblestorage.com.\tis-ops.hpe.com. (\n'
)
…

Prabhu S
- 15
- 6
1
vote
1 answer
Create a Python function out of a JS tree
I need to create a function from the following bunch of code:
jsHelperFunctions = """
function getTreeList(treeId) {
var $tree = $(treeId);
var itemsList = [];
var treeList = $($tree.jstree().get_json($tree, {
…

Gyrospeter
- 29
- 4
1
vote
1 answer
Mongoose 5.3.8 - Can't Extract Geo Keys with MultiLineString and $push
I am attempting to $push a coordinate pair into a document that contains a GeoJSON MultiLineString that is nested like this: [[[Number]]]
When I findOneAndUpdate like so:
req.body.point = [-123.347, 48.43649]
Route.findOneAndUpdate({name:…

Bdyce
- 332
- 2
- 11
1
vote
0 answers
How to input values into multiline string dynamically in python based on loops
I am trying to pass values into the multi line string per the application value present in input json. Printing the block per application with the values parsed from json.
block = """
{app} <<
{default1};
{default2};
server_name…

user9046848
- 11
- 1
1
vote
1 answer
How to get the longitude/latitude from a linestring
I have a dataframe with a column of linestrings. I want to convert the linestrings to its corresponding latitude/longitude so that I can plot it with basemap. My code is as follows:
gdf = gpd.read_file('./call2016.shp') #read the data into a…

christheliz
- 176
- 2
- 15
1
vote
1 answer
Matching and deleting newline character in mutiline perl regex
I know there are tons of questions about matching multiline regexes with perl on this site, however, I'm still having trouble figuring out how to do the below. So any help or links to the relevant questions would be highly appreciated.
I have a…

jan
- 249
- 5
- 17
1
vote
1 answer
Why does this regex not match everything till recurrence of first capture group?
And how do I make it do that?
Right now it stops at line breaks (like right after "Chicago,").
Alternatively, if I use DOTALL it just matches "Abbott A (1988)" and then the rest of the string till the very end.
I would like it to stop at the next…

treakec
- 139
- 1
- 9
1
vote
1 answer
Get repeating content by regex
I have some content in the format:
text = """Pos no
...
... 25/gm
The Text to be
...
excluded
Pos no
...
... 46 kg
The Text to be
...
excluded
Pos no
...
... 46 xunit
End of My Text
Where,
Pos no... 25/gm - It is a sort of tabular structure from…

Laxmikant
- 2,046
- 3
- 30
- 44
1
vote
1 answer
How do you split a multilinestring into x lines of equal length in R
If you have a multilinestring:
multiline <- MULTILINESTRING ((12.573769564824442 55.67932019039465, 12.573664593749626 55.67929917900955, 12.572916898811318 55.679149506755245, 12.5722100725459 55.679011254788364, 12.572044628054563…

Esben Eickhardt
- 3,183
- 2
- 35
- 56
1
vote
2 answers
in Ksh, why does the last (empty) line of my multi-line string disappears when saving it in a variable?
While implementing a script, I am facing the following issue :
when putting the multi-line result of a command into a variable, it seems the last (empty) line of my multi-line string disappear.
This line is "empty", but however, I can not lose the…

Seba991
- 13
- 3
1
vote
2 answers
Converting between a multiline string and a TstringList
I have a multi-line string and I want to remove some lines from it. The TMemo component contains the necessary code to do this.
MyMemo:=TMemo.Create(nil);
try
MyMemo.Text:=MyString;
MyMemo.Lines.Delete(x); // lines I want to delete
…

kaj66
- 153
- 1
- 11