Core Java With OCJP/SCJP-Regular Expressions-Part 12

  Рет қаралды 22,608

Durga Software Solutions

Durga Software Solutions

Күн бұрын

Пікірлер: 17
@stith_pragya
@stith_pragya 2 жыл бұрын
Thanks You So Much Durga sir................🙏🙏🙏🙏🙏🙏
@vivektadpatri7413
@vivektadpatri7413 8 жыл бұрын
Instead of m.group(0).equals(args[0]) , we can write the regex as "^(0|91)?[789]\\d{9}$"
@MrAnkit812
@MrAnkit812 Жыл бұрын
Sir, Matcher m = p.matcher(args[0]); , I didnn't understand why we put "args[0]" in it. can you please explain once again and another thing is if we pass args[0] then it will take just first part of the number that is --> either 0 or 91 or It will take whole number as input
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions Жыл бұрын
Hello Ankir. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@RoloJE1
@RoloJE1 9 жыл бұрын
Great video. One could also return Boolean m.matches(args[0]);
@richcohen5936
@richcohen5936 6 жыл бұрын
Doesn't the email's 1st character have to be alphabet only?? 14:15
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Rich Cohen. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627,7207212427/28
@MrGayathriram
@MrGayathriram 8 жыл бұрын
The easiest way is: if (m.matches()) valid else invalid
@sunnymaurya4633
@sunnymaurya4633 6 жыл бұрын
Here is the explanation of both method boolean matches() test whether the regular expression matches the pattern. boolean find() finds the next expression that matches the pattern.
@ekeshkumar6267
@ekeshkumar6267 4 жыл бұрын
sir your code is showing error in eclipse
@ekeshkumar6267
@ekeshkumar6267 4 жыл бұрын
sir it is showing index 0 out of bound for length 0
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Ekesh. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@sharon7161
@sharon7161 3 жыл бұрын
import java.util.regex.*; import java.util.*; public class Regex { public static void main(String[] args) { Scanner scan = new Scanner(System.in); Pattern p = Pattern.compile("(0|91)?[7-9][0-9]{9}"); System.out.print("Enter your mobile number: "); String mobile = scan.nextLine(); Matcher m = p.matcher(mobile); if(m.find() && m.group().equals(mobile)) { System.out.println("Valied"); } else { System.out.println("Invalied"); } } }
@sampathilokesh170
@sampathilokesh170 Жыл бұрын
Bro did you find solution for this
@anuraag3103
@anuraag3103 7 жыл бұрын
Simpler Code: Pattern pattern = Pattern.compile("(0|91)?[7-9][0-9]{9}"); Matcher matcher = pattern.matcher("7894534567"); if(matcher.matches()) { System.out.println("Valid Mobile number"); } else { System.out.println("Invalid mobile number"); }
@satyadasari1485
@satyadasari1485 6 жыл бұрын
"sivamani " mobile number.....☺☺
Core Java With OCJP/SCJP-Regular Expressions-Part 13
18:02
Durga Software Solutions
Рет қаралды 21 М.
Difference between Interface and Absract Class
16:57
DURGA EDUCATION
Рет қаралды 971 М.
Accompanying my daughter to practice dance is so annoying #funny #cute#comedy
00:17
Funny daughter's daily life
Рет қаралды 28 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 53 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 104 МЛН
LAVROV's interview with Tucker CARLSON 😁 [Parody]
8:34
Юрий ВЕЛИКИЙ
Рет қаралды 371 М.
Learn Regular Expressions In 20 Minutes
20:52
Web Dev Simplified
Рет қаралды 1,3 МЛН
HDFS Architecture
1:06:33
Durga Software Solutions
Рет қаралды 719 М.
The Flaws of Inheritance
10:01
CodeAesthetic
Рет қаралды 976 М.
Collections - Need of Collection Framework
15:36
Durga Software Solutions
Рет қаралды 1,6 МЛН
Accompanying my daughter to practice dance is so annoying #funny #cute#comedy
00:17
Funny daughter's daily life
Рет қаралды 28 МЛН