Charles baggage (picture for more info)
isn't it ALU I got told it was ALU
Answer:
This article shows how to use regex to remove spaces in between a String.
A string with spaces in between.
String text = "Hello World Java.";
We want to remove the spaces and display it as below:
Hello World Java.
1. Java regex remove spaces
In Java, we can use regex \\s+ to match whitespace characters, and replaceAll("\\s+", " ") to replace them with a single space.
Regex explanation.
`\\s` # Matches whitespace characters.
+ # One or more
StringRemoveSpaces.java
package com.mkyong.regex.string;
public class StringRemoveSpaces {
public static void main(String[] args) {
String text = "Hello World Java.";
String result = text.replaceAll("\\s+", " ");
System.out.println(result);
}
}
Output
Terminal
Hello World Java.
Answer:
network 10.10.8.0 0.0.3.255 area 0
this will include all the interfaces on a device whose IP addresses only begin with a 10.10.8, 10.10.9, 10.10.10, or 10.10.11.
Explanation:
<em>show ip ospf interface
</em>
<em>show ip ospf interface brief</em>
these commands are used to display the interfaces that have been enabled into local ospf . it also shows explanation about them by brief command mentioned above.
<em />