Java string manipulation program titles, now with sample inputs :

List of 100 real-time Java string manipulation program titles, now with sample inputs :


๐Ÿ” Authentication & Tokens

  1. Extract token value from API response string
    ๐Ÿ”ธ Input: "token=abc123xyz; sessionId=xyz456;"

  2. Extract only digits from a token string
    ๐Ÿ”ธ Input: "token=45gh6ab78;"

  3. Parse JWT and extract payload
    ๐Ÿ”ธ Input: "eyJhbGci...eyJ1c2VyIjoiam9obiJ9..."

  4. Extract session ID from cookie string
    ๐Ÿ”ธ Input: "JSESSIONID=58DFA0A2B54D5E85F39D;"

  5. Validate Bearer token format
    ๐Ÿ”ธ Input: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

  6. Remove prefix from access token
    ๐Ÿ”ธ Input: "access_token=abc123xyz"

  7. Split authorization header into type and value
    ๐Ÿ”ธ Input: "Basic YWxhZGRpbjpvcGVuc2VzYW1l"

  8. Check if token is expired using timestamp in string
    ๐Ÿ”ธ Input: "exp=1718918400;"

  9. Parse OAuth callback URL and extract code
    ๐Ÿ”ธ Input: "https://example.com/callback?code=12345abc"

  10. Extract CSRF token from HTML page source
    ๐Ÿ”ธ Input: "<input type='hidden' name='csrf' value='xyz456'>"


๐Ÿ“ง Emails & Usernames

  1. Extract domain from email
    ๐Ÿ”ธ Input: "user@openai.com"

  2. Extract username from email
    ๐Ÿ”ธ Input: "john.doe@gmail.com"

  3. Check if email string is valid
    ๐Ÿ”ธ Input: "example@domain.co"

  4. Mask email address (e.g., a***@gmail.com)
    ๐Ÿ”ธ Input: "alice@gmail.com"

  5. Extract company name from official email
    ๐Ÿ”ธ Input: "ravi@tcs.com"

  6. Validate email format using regex
    ๐Ÿ”ธ Input: "test_user@x.in"

  7. Extract multiple emails from a CSV string
    ๐Ÿ”ธ Input: "john@example.com, mary@abc.org, test@x.co"

  8. Count email domains in a string list
    ๐Ÿ”ธ Input: ["abc@gmail.com", "xyz@gmail.com", "abc@yahoo.com"]

  9. Group users by email domain
    ๐Ÿ”ธ Input: ["sara@tcs.com", "ram@infosys.com", "rita@tcs.com"]

  10. Remove duplicate emails from a string
    ๐Ÿ”ธ Input: "a@x.com, b@y.com, a@x.com"


๐Ÿงพ Finance, SMS, and Billing

  1. Extract amount from SMS
    ๐Ÿ”ธ Input: "Your account is credited with Rs. 5500.00"

  2. Extract transaction ID from message
    ๐Ÿ”ธ Input: "Txn ID: ABCD123456XYZ;"

  3. Validate if invoice number is in format INV-XXXX
    ๐Ÿ”ธ Input: "INV-1456"

  4. Mask credit card number except last 4 digits
    ๐Ÿ”ธ Input: "1234567812345678"

  5. Extract GST number from string
    ๐Ÿ”ธ Input: "GST: 27ABCDE1234F1Z5"

  6. Extract bank name from IFSC code
    ๐Ÿ”ธ Input: "SBIN0001234"

  7. Identify UPI ID from string
    ๐Ÿ”ธ Input: "paid to xyz@ybl"

  8. Extract date from billing string
    ๐Ÿ”ธ Input: "Invoice Date: 15-07-2025"

  9. Format account number with dashes
    ๐Ÿ”ธ Input: "123456789012"

  10. Extract PAN number from user input
    ๐Ÿ”ธ Input: "My PAN is ABCDE1234F"


๐Ÿ“ฑ Mobile & Phone Formatting

  1. Format 10-digit number into phone format
    ๐Ÿ”ธ Input: "9876543210"

  2. Validate if number is Indian mobile number
    ๐Ÿ”ธ Input: "919876543210"

  3. Extract country code from international number
    ๐Ÿ”ธ Input: "+91-9876543210"

  4. Convert numeric string to dial-pad format
    ๐Ÿ”ธ Input: "1800HELLOAI"

  5. Split contact string with multiple numbers
    ๐Ÿ”ธ Input: "9823xxxxx,9874xxxxx"

  6. Mask all but last 4 digits of phone number
    ๐Ÿ”ธ Input: "9876543210"

  7. Format phone number to E.164 format
    ๐Ÿ”ธ Input: "9876543210"+919876543210

  8. Validate SIM slot information from JSON
    ๐Ÿ”ธ Input: '{"slot":1,"imei":"123456789012345"}'

  9. Extract carrier name from mobile log
    ๐Ÿ”ธ Input: "Carrier: Jio 4G, Signal: -85dBm"

  10. Count valid mobile numbers in a string
    ๐Ÿ”ธ Input: "9823xxxxx,abcd123,9876xxxx"


๐ŸŒ URLs and Web Data

  1. Extract video ID from YouTube URL
    ๐Ÿ”ธ Input: "https://youtube.com/watch?v=ABC123XYZ"

  2. Extract domain name from URL
    ๐Ÿ”ธ Input: "https://www.openai.com/products/gpt"

  3. Extract query parameters from URL
    ๐Ÿ”ธ Input: "site.com/page?user=12&id=78"

  4. Parse anchor tag and extract href
    ๐Ÿ”ธ Input: "<a href='https://openai.com'>Link</a>"

  5. Validate if URL is HTTPS
    ๐Ÿ”ธ Input: "https://google.com"

  6. Decode URL-encoded string
    ๐Ÿ”ธ Input: "name=Sunil%20Sonawane"

  7. Extract image file names from HTML
    ๐Ÿ”ธ Input: "<img src='logo.png'>"

  8. Extract page title from HTML string
    ๐Ÿ”ธ Input: "<title>Dashboard</title>"

  9. Check if string contains valid URL
    ๐Ÿ”ธ Input: "Check this link: https://abc.in"

  10. Extract protocol (http/https) from URL
    ๐Ÿ”ธ Input: "https://mail.google.com"


๐Ÿ“„ File Path & Directory

  1. Extract filename from full path
    ๐Ÿ”ธ Input: "C:/users/files/report.pdf"

  2. Get file extension from path
    ๐Ÿ”ธ Input: "/home/download/sample.csv"

  3. Check if file is a PDF or DOC
    ๐Ÿ”ธ Input: "document.docx"

  4. Rename file by adding timestamp
    ๐Ÿ”ธ Input: "invoice.pdf"

  5. Create a slug from file name
    ๐Ÿ”ธ Input: "My File Name 2025.doc"

  6. Check if path is absolute
    ๐Ÿ”ธ Input: "/usr/data/"

  7. Replace whitespaces in file names
    ๐Ÿ”ธ Input: "my resume 2025.doc"

  8. Extract folder name from path
    ๐Ÿ”ธ Input: "C:/Users/Sunil/Documents/"

  9. Get file size info from string
    ๐Ÿ”ธ Input: "report.doc (Size: 2.3MB)"

  10. Extract filename from Windows-style path
    ๐Ÿ”ธ Input: "C:\\Users\\Admin\\data.csv"


๐Ÿ” Search, Highlighting, and Keywords

  1. Highlight keyword in paragraph
    ๐Ÿ”ธ Input: "AI is the future. AI will dominate tech."
    ๐Ÿ”ธ Keyword: "AI"

  2. Replace all keywords with bold tag
    ๐Ÿ”ธ Input: "AI helps in healthcare"
    ๐Ÿ”ธ Keyword: "AI"

  3. Count keyword occurrences
    ๐Ÿ”ธ Input: "Cloud and AI and Cloud computing are hot"
    ๐Ÿ”ธ Keyword: "Cloud"

  4. Search for case-insensitive match
    ๐Ÿ”ธ Input: "Machine Learning is fun"
    ๐Ÿ”ธ Keyword: "learning"

  5. Remove banned words from comment
    ๐Ÿ”ธ Input: "This app is damn useless"
    ๐Ÿ”ธ Banned Words: ["damn", "useless"]

  6. Extract hashtags from post
    ๐Ÿ”ธ Input: "Loving the #AI and #MachineLearning progress"

  7. Extract @mentions from comment
    ๐Ÿ”ธ Input: "Thanks @openai for GPT support"

  8. Find longest matching keyword
    ๐Ÿ”ธ Input: "We use JavaScript and Java"
    ๐Ÿ”ธ Keywords: ["Java", "JavaScript"]

  9. Auto-suggest word based on prefix
    ๐Ÿ”ธ Input: "auto"
    ๐Ÿ”ธ List: ["automation", "autonomous", "auth"]

  10. Extract trending tags from string
    ๐Ÿ”ธ Input: "#ai #ai #tech #ml #tech"


๐Ÿงช Validation and Checking

  1. Validate password strength
    ๐Ÿ”ธ Input: "A1@bcdef"

  2. Validate alphanumeric input
    ๐Ÿ”ธ Input: "abc123"

  3. Check if string is palindrome
    ๐Ÿ”ธ Input: "madam"

  4. Check if all characters are unique
    ๐Ÿ”ธ Input: "apple"

  5. Validate license key format
    ๐Ÿ”ธ Input: "AB12-CD34-EF56-GH78"

  6. Check if string contains only letters
    ๐Ÿ”ธ Input: "OpenAI"

  7. Validate coupon code
    ๐Ÿ”ธ Input: "SAVE2025"
    ๐Ÿ”ธ Format: 4 letters + 4 digits

  8. Validate vehicle number format
    ๐Ÿ”ธ Input: "MH12AB1234"

  9. Check if postal code is valid
    ๐Ÿ”ธ Input: "411027" (India)

  10. Validate if a string is binary
    ๐Ÿ”ธ Input: "10101001"


๐Ÿ” Cleanup & Formatting

  1. Remove special characters from text
    ๐Ÿ”ธ Input: "Hello! How@are#you$doing?"

  2. Replace multiple spaces with one
    ๐Ÿ”ธ Input: "This is spaced text"

  3. Trim and clean CSV entries
    ๐Ÿ”ธ Input: " apple , banana , cherry "

  4. Format string to title case
    ๐Ÿ”ธ Input: "java programming language"

  5. Convert sentence to camelCase
    ๐Ÿ”ธ Input: "convert this to camel case"

  6. Convert camelCase to snake_case
    ๐Ÿ”ธ Input: "myTestVariable"

  7. Normalize name input (trim, capitalize)
    ๐Ÿ”ธ Input: " sunil SONAWANE "

  8. Remove empty lines from multiline string
    ๐Ÿ”ธ Input: "Line1\n\n\nLine2\n"

  9. Convert string to lowercase without built-ins
    ๐Ÿ”ธ Input: "HELLO World"

  10. Strip emojis from message
    ๐Ÿ”ธ Input: "Hello ๐Ÿ‘‹, how are you ๐Ÿ˜Š?"


๐Ÿง  Smart Text Extraction

  1. Extract first name and last name
    ๐Ÿ”ธ Input: "Sunil Sonawane"

  2. Extract initials from full name
    ๐Ÿ”ธ Input: "Virat Kohli"

  3. Extract date from sentence
    ๐Ÿ”ธ Input: "Appointment is on 25/07/2025 at 3PM"

  4. Extract age from string
    ๐Ÿ”ธ Input: "My age is 29 years"

  5. Extract city name from address
    ๐Ÿ”ธ Input: "Flat 301, Galaxy Towers, Pune, Maharashtra"

  6. Extract digits from noisy sensor string
    ๐Ÿ”ธ Input: "Temp: 28.5C, Humidity: 65%"

  7. Extract key-value pairs from log entry
    ๐Ÿ”ธ Input: "user=John;id=123;status=active;"

  8. Extract version from app string (e.g., v1.2.3)
    ๐Ÿ”ธ Input: "App version: v2.4.1-beta"

  9. Convert string to JSON-like map
    ๐Ÿ”ธ Input: "name=Sunil;age=30;city=Pune"

  10. Extract language code from locale string
    ๐Ÿ”ธ Input: "en_US"Output: "en"



Comments

Popular posts from this blog

10 automation test cases for https://www.saucedemo.com/ (Sauce Demo)

Java Roadmap for SDET Superstars!

Mastering XPath in Selenium 4 ๐Ÿš€ – Supported Functions & Axes Explained