Skip to content
PD
Browser Automation Studio

String Operations in BAS

The String module in Browser Automation Studio — one of its biggest modules for cleaning, extracting, formatting and generating text data, from random passwords to CSV.

Almost everything a bot touches is text — page content, account data, messages, exported rows. The String module is one of the largest in BAS precisely because text needs so much handling: cleaning, extracting, formatting and generating.

What it’s for

The module performs any operation on strings and text data — trimming away unwanted characters and extracting useful pieces like emails, phone numbers and links. If you’re shaping text in any way, this is the module.

Operations you’ll use constantly

The book singles these out as the most-used:

  • Random string — generate a random string from a character set. This is how you create a random password or username for registering a new account.
  • Template — fill a text template with values, building consistent output from a pattern.
  • Get length — measure a string.
  • Replace string — substitute one piece of text for another.
  • Parse CSV string — split a CSV line into its fields.

The wider toolkit

Beyond those, the module covers the full range of text work:

  • Cleaning — trim whitespace, change case (upper/lower), remove HTML tags, handle special HTML characters.
  • Extracting — get a substring, find a substring’s position, count occurrences, match by pattern.
  • Transforming — replace, insert, format a number, convert text to a number, combine strings.
  • Comparing — check whether two strings match.

Strings, regex and parsing

The String module handles the bulk of everyday text work. When matching gets more complex — flexible patterns rather than fixed substrings — step up to regular expressions. And when you’re pulling data out of a page rather than a plain string, XPath and JSON are the right tools. Think of strings as the foundation the parsing modules build on.

FAQ

How do I generate a random password in BAS?

Use the Random string action in the String module. It generates a random string from the character set you specify — exactly what you need for passwords and usernames when auto-registering accounts.

Can BAS parse CSV and strip HTML tags?

Yes. The String module includes parsing a CSV string into fields and removing HTML tags from text, alongside dozens of other operations for cleaning and reshaping text.

More on this topic

  • #Browser Automation Studio
  • #BAS
  • #Strings
  • #Text
  • #Data

Have an idea? Let’s turn it into a working product.

Skip months of uncertainty. Get a clear architecture, a working MVP and a system you can test, sell and scale.