Skip to content

How to remove sub-string starting and ending with something?

How can I remove a sub-string from a string starting and ending with a certain character combination like: That I want as result: I tried something like this but this does not work. Is there a way to implement this? Answer This could work: Regex101 EDIT : after clarification by the OP, changed the answer to u…

Read whole file in Apache Beam

Is it possible to read whole file (not line by line) in Apache Beam? For example, I want to read multiline JSONs, and my idea is to read file by file, extract data from each file and create PCollection from lists. Is it good idea or it’s better to preprocess source JSONs to one JSON file where each line…

Removing double new line from string

So I have this problem for some reason some times I’m getting a string with two n/ n/ signs between first <p> and <p><p>, how could try to catch it and remove it? look like this if I paste it if I look at this string from debugger then I see it like <p>nn<p><p> so bas…