dasari4kntr Posted January 31, 2023 Report Posted January 31, 2023 3 minutes ago, MiryalgudaMaruthiRao said: step 2 deniki uncle or..you can install the spring initilizer pluing in your intellij... Quote
usauae Posted January 31, 2023 Author Report Posted January 31, 2023 8 minutes ago, ramudu said: try this regex - ^[a-z]{1}[0-9]{3}$ (any a to z 1 char and followed by 3 numbers) thanks bro, that worked. Regex ki practice ye na or yemi ain tips vuntaya ? regex 101 website yeppudu aina avasaram vunte try chestha but I get confused Quote
usauae Posted January 31, 2023 Author Report Posted January 31, 2023 13 minutes ago, Barbarik said: use regex match pattern... Regex - ^a\d{3}$ you can test this pattern here - https://regex101.com/ thanks bro this and [a-z]{1}[0-9]{3}$ both worked. Quote
dasari4kntr Posted January 31, 2023 Report Posted January 31, 2023 1 minute ago, usauae said: aa regex chala chiraku ga vuntundi bro, regex logic kosam ye asking try this AI tool...if you type in simple tems...it will give you regex..based on your requirement... https://www.autoregex.xyz/ 1 Quote
usauae Posted January 31, 2023 Author Report Posted January 31, 2023 12 minutes ago, uoY said: Really bro? Language? 100 of libraries vuntayi already in ur project VB bro supporting legacy app Quote
ramudu Posted January 31, 2023 Report Posted January 31, 2023 1 minute ago, dasari4kntr said: try this AI tool...if you type in simple tems...it will give you regex..based on your requirement... https://www.autoregex.xyz/ AI tho maa potta medha kottelaa unnav kadha bro 1 Quote
usauae Posted January 31, 2023 Author Report Posted January 31, 2023 1 minute ago, dasari4kntr said: try this AI tool...if you type in simple tems...it will give you regex..based on your requirement... https://www.autoregex.xyz/ awesome bro bookmarked this link hope they keep it free Quote
dasari4kntr Posted January 31, 2023 Report Posted January 31, 2023 3 minutes ago, usauae said: VB bro supporting legacy app VB...na inka nadustunnaya..ee VB projects...? Quote
usauae Posted January 31, 2023 Author Report Posted January 31, 2023 4 minutes ago, dasari4kntr said: VB...na inka nadustunnaya..ee VB projects...? Yemi cheppamantavu bro we still have vb, asp apps as old as 15 yrs patch lu vesukuntu laagu chestunnam by the time I’m out of this job I will be super outdated too Quote
dasari4kntr Posted January 31, 2023 Report Posted January 31, 2023 Just now, usauae said: Yemi cheppamantavu bro we still have vb, asp apps as old as 15 yrs patch lu vesukuntu laagu chestunnam by the time I’m out of this job I will be super outdated too you mean classic asp 3.0 (not asp.net)… if yes…its super outdated… Quote
MiryalgudaMaruthiRao Posted January 31, 2023 Report Posted January 31, 2023 40 minutes ago, dasari4kntr said: you mean classic asp 3.0 (not asp.net)… if yes…its super outdated… SpringBootGen ani undi Adena? Quote
pandu123b Posted January 31, 2023 Report Posted January 31, 2023 you need to iterate through character by character and check isnum or isalpha and output only matching strings. Quote
dasari4kntr Posted January 31, 2023 Report Posted January 31, 2023 29 minutes ago, MiryalgudaMaruthiRao said: SpringBootGen ani undi Adena? spring boot helper this gives the boiler plate... spring boot gen...helps you with autocomplete... Quote
csrcsr Posted January 31, 2023 Report Posted January 31, 2023 2 hours ago, usauae said: I have a list of strings that are always 4 characters {'a001', 'aa01', 'aaa1', 'aaaa' } I need to select only the ones that are alph num num num ex: 'a001' any ideas ? import java.util.Arrays; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Afdb { public static boolean isQualified(String str) { String reg = "^[a-zA-Z]{1}\\d{3}$"; Pattern pattern = Pattern.compile(reg); if (str == null) { return false; } Matcher m = pattern.matcher(str); return m.matches(); } public static void main(String[] args) { String[] myArray = {"a001", "aa01", "aaa1", "aaaa","a0001" }; Arrays.asList(myArray) .stream() .filter(element -> Afdb.isQualified(element)) .map(element -> "string: " + element) .forEach(System.out::println); } } Quote
TuesdayStories Posted January 31, 2023 Report Posted January 31, 2023 4 minutes ago, csrcsr said: import java.util.Arrays; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Afdb { public static boolean isQualified(String str) { String reg = "^[a-zA-Z]{1}\\d{3}$"; Pattern pattern = Pattern.compile(reg); if (str == null) { return false; } Matcher m = pattern.matcher(str); return m.matches(); } public static void main(String[] args) { String[] myArray = {"a001", "aa01", "aaa1", "aaaa","a0001" }; Arrays.asList(myArray) .stream() .filter(element -> Afdb.isQualified(element)) .map(element -> "string: " + element) .forEach(System.out::println); } } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.